Jan Andres

26 papers Journal 26
YearRankTypeTitle / Venue / Authors
2023 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Pavel Ludvík
2023 J jnl
Commun. Nonlinear Sci. Numer. Simul.
Jan Andres, Pavel Ludvík
2021 J jnl
Int. J. Bifurc. Chaos
Jan Andres
2021 J jnl
Int. J. Bifurc. Chaos
Jan Andres
2021 J jnl
J. Quant. Linguistics
Jan Andres, Martina Benesová, Jirí Langer
2020 J jnl
Int. J. Bifurc. Chaos
Jan Andres
2020 J jnl
Commun. Nonlinear Sci. Numer. Simul.
Jan Andres, Jirí Langer, Vladimír Matlach
2019 J jnl
Axioms
Jan Andres, Denis Pennequin
2019 J jnl
Fuzzy Sets Syst.
Jan Andres, Miroslav Rypka
2019 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Karel Pastor
2018 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Karel Pastor
2018 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Karel Pastor
2018 J jnl
Fuzzy Sets Syst.
Jan Andres, Miroslav Rypka
2017 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Jirí Fiser
2016 J jnl
Fuzzy Sets Syst.
Jan Andres, Miroslav Rypka
2016 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Lech Górniewicz
2014 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Lech Górniewicz
2013 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Miroslav Rypka
2012 J jnl
J. Quant. Linguistics
Jan Andres, Martina Benesová
2012 J jnl
J. Quant. Linguistics
Jan Andres, Martina Benesová, Lubomír Kubácek, Jana Vrbková
2012 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Miroslav Rypka
2012 J jnl
Comput. Math. Appl.
Jan Andres
2011 J jnl
Glottometrics
Jan Andres, Martina Benesová
2010 J jnl
J. Quant. Linguistics
Jan Andres
2006 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Pavla Snyrychová, Piotr Szuca
2004 J jnl
Int. J. Bifurc. Chaos
Jan Andres, Jirí Fiser
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()