Skip to content

ExactSearch brute force pathway for Faiss is causing queries to timeout #2936

@dianastea

Description

@dianastea

When running queries against indices hosted on OpenSearch, I have multiple queries where attempting to query n=200+ results causes the queries to timeout due to the ExactSearch pathway being triggered during knn filtering as described here https://docs.opensearch.org/latest/vector-search/filter-search-knn/efficient-knn-filtering/ — I want to request a patch to add config that can disable the brute force path and just return however many results were retrieved post-ANN.

This would require a change here https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/index/query/KNNWeight.java#L632
I consistently see this message in the logs for the queries that are timing out, which notably, have very exclusive filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeaturesIntroduces a new unit of functionality that satisfies a requirement

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions