Irina Galinskaya

13 papers A 1B 1Journal 1Unranked 10
YearRankTypeTitle / Venue / Authors
2016 conf
AMTA (2)
Irina Galinskaya, Farhat Aminov
2016 conf
AMTA (2)
Irina Galinskaya, Alexey Baytin
2016 conf
WMT
Vadim Shchukin, Dmitry Khristich, Irina Galinskaya
2016 conf
WMT
Anton Dvorkovich, Sergey Gubanov, Irina Galinskaya
2014 conf
SSST@EMNLP
Alexander Chuchunkov, Alexander Tarelkin, Irina Galinskaya
2014 conf
ACL (2)
Sergey Gubanov, Irina Galinskaya, Alexey Baytin
2014 B conf
LREC
Irina Galinskaya, Valentin Gusev, Elena Mescheryakova, Mariya Shmatova
2014 conf
WMT@ACL
Alexey Borisov, Irina Galinskaya
2013 J jnl
CoRR
Jacob Dlougach, Irina Galinskaya
2013 A conf
CIKM
Alexey Baytin, Irina Galinskaya, Marina Panina, Pavel Serdyukov
2013 conf
WMT@ACL
Alexey Borisov, Jacob Dlougach, Irina Galinskaya
2012 conf
WWW (Companion Volume)
Alisa Strizhevskaya, Alexey Baytin, Irina Galinskaya, Pavel Serdyukov
2012 conf
SMT@COLING
Jacob Dlougach, Irina Galinskaya
redb/settings/elasticsearch.py
← Index redb/settings/elasticsearch.py python
import logging
import os

from elasticsearch import Elasticsearch
from dotenv import load_dotenv

load_dotenv()

# Elasticsearch configuration
ELASTIC_ENDPOINT = os.getenv("ELASTIC_HOST")
ELASTIC_ENFORCE_SSL = os.getenv("ELASTIC_ENFORCE_SSL", False) == "True"
ELASTIC_USER = os.getenv("ELASTIC_USER")
ELASTIC_PASSWORD = os.getenv("ELASTIC_PASSWORD")
ELASTIC_BINARIES_COLLECTION = os.getenv("ELASTIC_BINARIES_COLLECTION", "test_db")

# Cached client instance
_elasticsearch_client = None

def get_elasticsearch_client():
    """Get Elasticsearch client with lazy initialization and caching"""
    global _elasticsearch_client
    
    if _elasticsearch_client is None:
        if not ELASTIC_ENDPOINT:
            raise ValueError("ELASTIC_HOST environment variable is required for Elasticsearch connection")
            
        _elasticsearch_client = Elasticsearch(
            ELASTIC_ENDPOINT,
            verify_certs=ELASTIC_ENFORCE_SSL,
            basic_auth=(ELASTIC_USER, ELASTIC_PASSWORD),
            maxsize=20,
            retry_on_timeout=True,
            timeout=30,
        )
    
    return _elasticsearch_client

def create_elasticsearch_client():
    """Create a new Elasticsearch client connection (legacy function)"""
    return get_elasticsearch_client()