You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we don't ideally need two different functions in the interface which can be consolidated as part of the go-faiss's Selector interface, which is actually a parameter to these functions
Thejas-bhat
changed the title
draft: simplify the implementation of filter logic
Simplify the implementation of vector search filter logic
Apr 15, 2026
Hey @Thejas-bhat, I do not understand the need or the urgency of this PR.
I am seeing some issues here and I am wondering why this PR was merged in with this haste without a proper review from the team, given that the PR was marked as ready for review a few hours back.
When we have a search request coming in on a segment with no exclude bitmap (which happens when there are no deleted vectors in the segment) - the exclude bitmap is nil and hence selector too will be nil. In this case, if the params is not nil and selector is nil (for float32 indices), we just call the go-faiss SearchWithSelector API which will error out. This is orthogonal to the earlier behavior where we handled this case well, where we created a valid SearchParams.
When using for BIVF indices, in the case where selector is not nil and params is nil, we call SearchWithSelector where simply ignore the selector and call b.Search(xb, k)
For BIVF incides again: if selector is nil (no exclusions) and params is not nil, we simply error out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selectorinterface, which is actually a parameter to these functions