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

[Enhancement Request] Extend search by allowing to choose the score mode for empty query collector #16659

Open
martin-gaievski opened this issue Nov 15, 2024 · 0 comments · May be fixed by #16660
Assignees
Labels
enhancement Enhancement or improvement to existing feature or request Search Search query, autocomplete ...etc untriaged

Comments

@martin-gaievski
Copy link
Member

Is your feature request related to a problem? Please describe

The current implementation of MultiCollector in Lucene has limitations that can lead to several undesirable side effects in OpenSearch, including:

  • high latencies in search
  • runtime errors
  • incorrect search hits

the limitation is in method public ScoreMode scoreMode(), in case of multiple collectors (which is the typical use case for MultiCollector) the score mode can fall back to ScoreMode.COMPLETE or ScoreMode.COMPLETE_NO_SCORES. This can happen in case score modes are not the same among all the collectors.

One specific scenario affected by this limitation is when a client uses EMPTY_CONTEXT from QueryCollectorContext. The EMPTY_CONTEXT is initialized by EMPTY_COLLECTOR, which has a hardcoded score mode value as COMPLETE_NO_SCORES.

Describe the solution you'd like

To address this issue, I propose allowing clients to specify the score mode for EMPTY_CONTEXT. This enhancement will maintain the original functionality of allowing callers to omit the default top docs collector (as introduced in PR #13481) while providing more flexibility and control over the score mode.

Related component

Search

Describe alternatives you've considered

No response

Additional context

No response

@martin-gaievski martin-gaievski added enhancement Enhancement or improvement to existing feature or request untriaged labels Nov 15, 2024
@github-actions github-actions bot added the Search Search query, autocomplete ...etc label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Search Search query, autocomplete ...etc untriaged
Projects
Status: 🆕 New
1 participant