fix: preserve pgvector None sentinel on zero top_k
query_external_vector_document_ids must return None when on the pgvector path before applying the top_k<=0 empty-list guard.
This commit is contained in:
parent
8bd795c50e
commit
1fa9930d41
|
|
@ -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 []
|
||||
|
|
|
|||
Loading…
Reference in New Issue