Skip to content

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

Open
@ChrisHegarty

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions