Skip to content

Commit

Permalink
fixed bug with search params for filtered kNN
Browse files Browse the repository at this point in the history
  • Loading branch information
metonymic-smokey committed Sep 10, 2024
1 parent e0a1261 commit 08e373d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions faiss_vector_posting.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool
// or, decreasing order of proximity to query vector.
closestCentroidIDs, centroidDistances, _ := vecIndex.GetCentroidDistances(qVector, eligibleCentroidIDs)

// TODO What to do if user specifies nprobe percent?
nprobe := vecIndex.GetNProbe()

eligibleDocsTillNow := int64(0)
Expand All @@ -455,8 +454,8 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool
}

scores, ids, err := vecIndex.SearchSpecifiedClusters(vectorIDsToInclude,
closestCentroidIDs[:centroidPos], k, qVector,
centroidDistances[:centroidPos], params)
closestCentroidIDs, centroidPos, len(closestCentroidIDs),
k, qVector, centroidDistances, params)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 08e373d

Please sign in to comment.