Irene Unceta

18 papers B 1Journal 12Unranked 4
YearRankTypeTitle / Venue / Authors
2026 J jnl
AI Soc.
Paula Subías-Beltrán, Irene Unceta, Itziar de Lecuona, Oriol Pujol
2024 J jnl
Cogn. Syst. Res.
Irene Unceta, Bernat Salbanya, Jordi Coll, Mateu Villaret, Jordi Nin
2023 J jnl
CoRR
Nahuel Statuto, Irene Unceta, Jordi Nin, Oriol Pujol
2023 J jnl
J. Mach. Learn. Res.
Nahuel Statuto, Irene Unceta, Jordi Nin, Oriol Pujol
2023 conf
CCIA
Bernat Salbanya, Irene Unceta, Jordi Nin
2021
Irene Unceta
2021 J jnl
Entropy
Irene Unceta, Jordi Nin, Oriol Pujol
2021 conf
CCIA
Irene Unceta, Bernat Salbanya, Jordi Nin
2021 J jnl
Entropy
Pol Borrellas, Irene Unceta
2020 J jnl
IEEE Access
Irene Unceta, Jordi Nin, Oriol Pujol
2020 J jnl
CoRR
Irene Unceta, Jordi Nin, Oriol Pujol
2020 J jnl
Entropy
Irene Unceta, Jordi Nin, Oriol Pujol
2020 B conf
MDAI
Irene Unceta, Diego Palacios, Jordi Nin, Oriol Pujol
2019 J jnl
CoRR
Irene Unceta, Jordi Nin, Oriol Pujol
2019 conf
CCIA
Irene Unceta, Jordi Nin, Oriol Pujol
2019 J jnl
CoRR
Irene Unceta, Diego Palacios, Jordi Nin, Oriol Pujol
2019 conf
IbPRIA (1)
Irene Unceta, Jordi Nin, Oriol Pujol
2018 J jnl
CoRR
Irene Unceta, Jordi Nin, Oriol Pujol
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()