fix: FAISS filtered search drops over-fetched candidates before filtering (#5453)

Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
This commit is contained in:
Yash Raj Pandey
2026-06-17 16:34:27 +05:30
committed by GitHub
co-authored by kartik-mem0
parent 7ed2faab84
commit 703e8a035d
2 changed files with 27 additions and 1 deletions
+1 -1
View File
@@ -390,7 +390,7 @@ class FAISS(VectorStoreBase):
fetch_k = top_k * 2 if filters else top_k
scores, indices = self.index.search(query_vectors, fetch_k)
results = self._parse_output(scores[0], indices[0], top_k)
results = self._parse_output(scores[0], indices[0], fetch_k)
if filters:
filtered_results = []