opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.83k stars 1.83k forks source link

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

Open martin-gaievski opened 6 days ago

martin-gaievski commented 6 days ago

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 https://github.com/opensearch-project/OpenSearch/issues/16659

Check List

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.

github-actions[bot] commented 6 days ago

:white_check_mark: Gradle check result for 484d820c677a3dcdf29e853608829d15b3171086: SUCCESS

codecov[bot] commented 6 days ago

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 7 commits behind head on main.

Files with missing lines Patch % Lines
...opensearch/search/query/QueryCollectorContext.java 78.57% 3 Missing :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

owaiskazi19 commented 6 days ago

@reta can you also take a look since you reviewed the original PR: https://github.com/opensearch-project/OpenSearch/pull/13481?

github-actions[bot] commented 5 days ago

:white_check_mark: Gradle check result for 7f20f72cdcba5854343f4f361c93b2d2311f1bfc: SUCCESS

github-actions[bot] commented 3 days ago

:grey_exclamation: Gradle check result for 65bcf14bd970923063416f959ec9e0c2caefbd25: 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.

github-actions[bot] commented 3 days ago

:white_check_mark: Gradle check result for fd75a58808d03d0ebc136a9fdb087c7a151db645: SUCCESS