Skip to content

Introduce a new index-level setting for disabling exact search based on the cardinality of the filtered documents#3109

Open
OrestisNer wants to merge 6 commits intoopensearch-project:mainfrom
OrestisNer:orestiner/disable-exact-search-threshold
Open

Introduce a new index-level setting for disabling exact search based on the cardinality of the filtered documents#3109
OrestisNer wants to merge 6 commits intoopensearch-project:mainfrom
OrestisNer:orestiner/disable-exact-search-threshold

Conversation

@OrestisNer
Copy link

@OrestisNer OrestisNer commented Feb 9, 2026

Description

Introduce a new index-level setting called index.knn.faiss.efficient_filter.disable_exact_search_threshold that allows users to disable the fallback to exact (brute-force) search, based on the cardinality of the filtered documents, which happens after an ANN search when using Faiss efficient filtering.
Heavily inspired by this PR (which provides a setting for disabling exact search), with this new setting the goal is to provide more flexibility and allow users to optimize performance/relevance trade-offs based on their dataset sizes.

Related Issues

Resolves #2936
#3022 (comment)

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…t_search setting to disable exact search based on the cardinality of the filterIds

Signed-off-by: Orestis Nerantzis <orestis.nerantzis@workday.com>
Signed-off-by: Orestis Nerantzis <orestis.nerantzis@workday.com>
@OrestisNer OrestisNer force-pushed the orestiner/disable-exact-search-threshold branch from aa45784 to ea5eb75 Compare February 9, 2026 21:23
@OrestisNer OrestisNer changed the title introduce index.knn.faiss.efficient_filter.cardinality_threshold_exact_search setting to disable exact search based on the cardinality of the filterIds Introduce a new index-level setting for disabling exact search based on the cardinality of the filtered documents Feb 9, 2026
@navneet1v
Copy link
Collaborator

@OrestisNer do you want to move this PR to in review state?

@OrestisNer
Copy link
Author

Hey @navneet1v, sorry for being late. Yes I will move it

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

Successfully merging this pull request may close these issues.

ExactSearch brute force pathway for Faiss is causing queries to timeout

2 participants