Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
metonymic-smokey committed Sep 11, 2024
1 parent 767ab19 commit 84621df
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions faiss_vector_posting.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool
}
}
eligibleCentroidIDs := make([]int64, 0)
deleted := 0
for centroidID, vecIDs := range centroidVecIDMap {
vecIDs.And(eligibleVecIDsBitmap)
if vecIDs.GetCardinality() > 0 {
Expand All @@ -430,13 +429,13 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool
} else {
// don't consider clusters with no eligible IDs.
delete(centroidVecIDMap, centroidID)
deleted++
}
}

// getting the eligible centroids in increasing order of distance
// or, decreasing order of proximity to query vector.
closestCentroidIDs, centroidDistances, _ := vecIndex.GetCentroidDistances(qVector, eligibleCentroidIDs)
// i.e. decreasing order of proximity to query vector.
closestCentroidIDs, centroidDistances, _ :=
vecIndex.GetCentroidDistances(qVector, eligibleCentroidIDs)

nprobe := vecIndex.GetNProbe()

Expand Down

0 comments on commit 84621df

Please sign in to comment.