diff --git a/src/crud/document.py b/src/crud/document.py index dd9a3f46..37eb94b4 100644 --- a/src/crud/document.py +++ b/src/crud/document.py @@ -228,12 +228,12 @@ async def query_external_vector_document_ids( empty list when the external store has no results, or None when the pgvector (DB-only) path should be used instead. """ - if top_k <= 0: - return [] - if _uses_pgvector(): return None + if top_k <= 0: + return [] + external_vector_store = get_external_vector_store() if external_vector_store is None: return []