Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IDSelector to support vector filtering by distance #3632

Closed
wants to merge 32 commits into from

Conversation

jaepil
Copy link
Contributor

@jaepil jaepil commented Jul 13, 2024

Currently, there is no way to select vectors using distance with IDSelector. This PR adds overloaded version of is_member(idx, [d]) function to IDSelector, so the user can make a decision based on the distance.

Let me know, if Faiss already supports similar functionality in different ways.

@jaepil jaepil marked this pull request as ready for review July 16, 2024 04:34
@mnorris11 mnorris11 self-assigned this Jul 22, 2024
@mnorris11
Copy link

mnorris11 commented Jul 22, 2024

Hi @jaepil , sorry for the delay. I took a look through it.

Is range_search not suitable to your use case? (guessing you are interested mainly in HNSW given it was updated in the PR, so range_search for HNSW is found at

void IndexHNSW::range_search(
)

If range_search is not right here, my first questions are:

  1. Can you share more info on why you need distance for your use case?
  2. Can you add a unit test demonstrating/testing it?
  3. Is this applicable for other indexes besides HNSW?

@mnorris11
Copy link

mnorris11 commented Jul 24, 2024

Closing PR at team's request. But if range_search is not suitable, please reach out / reopen.

Adding some more details:

@mnorris11 mnorris11 closed this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants