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

cuvs-java: support pre-filter for all query types #696

Open
ChrisHegarty opened this issue Feb 14, 2025 · 0 comments
Open

cuvs-java: support pre-filter for all query types #696

ChrisHegarty opened this issue Feb 14, 2025 · 0 comments

Comments

@ChrisHegarty
Copy link
Contributor

ChrisHegarty commented Feb 14, 2025

This issue has been filed to track adding support for a pre-filter to all query types, namely CagraQuery and HnswQuery.

Currently only BruteForceQuery supports a pre-filter. For example,

var queryBuilder = new BruteForceQuery.Builder()
   .withPrefilter(new long[] { 0b1111L });

A pre-filter is important for the Lucene use case, since Lucene uses a pre-filter to, among other things, support filtering-out deleted docs while searching. (a deleted doc may still appear in the index, but is filtered out during search with a pre-filter). For now, we workaround this during search by oversampling the topK when searching an index that may have deleted docs or a user provided pre-filter. This is a rough heuristic and not ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant