diff --git a/faiss_vector_posting.go b/faiss_vector_posting.go index e6893492..d93e2c6f 100644 --- a/faiss_vector_posting.go +++ b/faiss_vector_posting.go @@ -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) @@ -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 }