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:
co-authored by
kartik-mem0
parent
7ed2faab84
commit
703e8a035d
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user