File size: 559 Bytes
9825db3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import logging
import config

logger = logging.getLogger(__name__)


def get_index_manager():
    """
    Dynamically returns the active vector index manager (Qdrant or FAISS)
    based on `config.VECTOR_STORE_BACKEND`.
    """
    backend = getattr(config, "VECTOR_STORE_BACKEND", "faiss").lower()
    if backend == "qdrant":
        from vector_search.index_qdrant import get_qdrant_manager
        return get_qdrant_manager()
    else:
        from vector_search.index_faiss import get_index_manager as get_faiss_manager
        return get_faiss_manager()