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

Add method to create empty query collector context with customizable score mode #16660

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

martin-gaievski
Copy link
Member

@martin-gaievski martin-gaievski commented Nov 15, 2024

Description

This PR introduces a new method that allows clients to create an empty query collector context with a specified score mode. This enhancement addresses limitations in the current MultiCollector implementation where score modes can default to suboptimal values.

Related Issues

Resolves #16659

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@martin-gaievski martin-gaievski force-pushed the add_empty_top_scores_collector branch from 30dd1ab to 484d820 Compare November 15, 2024 21:09
Copy link
Contributor

✅ Gradle check result for 484d820: SUCCESS

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.

Project coverage is 72.09%. Comparing base (3b9ca63) to head (fd75a58).
Report is 52 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/search/query/QueryCollectorContext.java 78.57% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16660      +/-   ##
============================================
+ Coverage     71.99%   72.09%   +0.10%     
- Complexity    65153    65186      +33     
============================================
  Files          5318     5318              
  Lines        303903   303909       +6     
  Branches      43970    43970              
============================================
+ Hits         218804   219114     +310     
+ Misses        67138    66817     -321     
- Partials      17961    17978      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@owaiskazi19
Copy link
Member

owaiskazi19 commented Nov 15, 2024

@reta can you also take a look since you reviewed the original PR: #13481?

Signed-off-by: Martin Gaievski <[email protected]>
Copy link
Contributor

✅ Gradle check result for 7f20f72: SUCCESS

@martin-gaievski martin-gaievski force-pushed the add_empty_top_scores_collector branch from 990ab39 to 65bcf14 Compare November 18, 2024 19:35
@martin-gaievski martin-gaievski requested a review from reta November 18, 2024 20:16
Copy link
Contributor

❕ Gradle check result for 65bcf14: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Signed-off-by: Martin Gaievski <[email protected]>
return ScoreMode.COMPLETE_NO_SCORES;
}
};
private static Collector createEmptyCollector(ScoreMode scoreMode) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please reference the relevant Apache Lucene issue as we've discussed, so it will be clear why we are doing score mode "dance", thanks!

Copy link
Contributor

✅ Gradle check result for fd75a58: SUCCESS

@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@opensearch-trigger-bot opensearch-trigger-bot bot added stalled Issues that have stalled and removed stalled Issues that have stalled labels Dec 19, 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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