Skip to content

Commit

Permalink
updated function names
Browse files Browse the repository at this point in the history
  • Loading branch information
metonymic-smokey committed Sep 19, 2024
1 parent cc1ca04 commit c727f99
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions faiss_vector_posting.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool

// Retrieve the mapping of centroid IDs to vectors within
// the cluster.
clusterAssignment, _ := vecIndex.GetClusterAssignment()
clusterAssignment, _ := vecIndex.ObtainClusterToVecIDsFromIVFIndex()
// Accounting for a flat index
if len(clusterAssignment) == 0 {
scores, ids, err := vecIndex.SearchWithIDs(qVector, k,
Expand Down Expand Up @@ -444,7 +444,8 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool
// Ordering the retrieved centroid IDs by increasing order
// of distance i.e. decreasing order of proximity to query vector.
closestCentroidIDs, centroidDistances, _ :=
vecIndex.GetCentroidDistances(qVector, eligibleCentroidIDs)
vecIndex.ObtainClustersWithDistancesFromIVFIndex(qVector,
eligibleCentroidIDs)

// Getting the nprobe value set at index time.
nprobe := vecIndex.GetNProbe()
Expand All @@ -465,9 +466,9 @@ func (sb *SegmentBase) InterpretVectorIndex(field string, requiresFiltering bool

// Search the clusters specified by 'closestCentroidIDs' for
// vectors whose IDs are present in 'vectorIDsToInclude'
scores, ids, err := vecIndex.SearchSpecifiedClusters(vectorIDsToInclude,
closestCentroidIDs, minEligibleCentroids, k, qVector,
centroidDistances, params)
scores, ids, err := vecIndex.SearchClustersFromIVFIndex(
vectorIDsToInclude, closestCentroidIDs, minEligibleCentroids,
k, qVector, centroidDistances, params)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c727f99

Please sign in to comment.