Skip to content

Conversation

@jdddog
Copy link

@jdddog jdddog commented Sep 5, 2025

Enables support for the include_named_queries_score query parameter in the msearch endpoint.

It also fixes an bug with the search endpoint where setting include_named_queries_score to true
in the request body (rather than as a URL query parameter) would trigger the computation of named query scores
but not include them in the SearchHit output. This was because SearchHit previosuly used the URL query parameter
to determine whether to write the scores, instead of checking if the scores were present. Fixing this also enables
include_named_queries_score to be specified in individual search request bodies in msearch with no query parameter.

Do I need to

Related Issues

Resolves #19102
API changes companion pull request opensearch-project/opensearch-api-specification#955
Public documentation issue/PR opensearch-project/documentation-website#10888

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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2025

❌ Gradle check result for ea16a22: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@jdddog jdddog force-pushed the msearch-include-named-queries-score branch from ea16a22 to 4b3abd8 Compare September 8, 2025 03:54
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2025

❌ Gradle check result for 4b3abd8: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2025

✅ Gradle check result for 1c57e24: SUCCESS

@codecov
Copy link

codecov bot commented Sep 9, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.04%. Comparing base (39b7a59) to head (7f2bed8).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...src/main/java/org/opensearch/search/SearchHit.java 0.00% 0 Missing and 2 partials ⚠️
...main/java/org/opensearch/search/SearchService.java 0.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19241      +/-   ##
============================================
+ Coverage     73.00%   73.04%   +0.04%     
- Complexity    70534    70540       +6     
============================================
  Files          5719     5719              
  Lines        323260   323266       +6     
  Branches      46816    46819       +3     
============================================
+ Hits         235993   236136     +143     
+ Misses        68224    68072     -152     
- Partials      19043    19058      +15     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jdddog jdddog force-pushed the msearch-include-named-queries-score branch from 1c57e24 to f241c28 Compare September 15, 2025 22:45
@github-actions
Copy link
Contributor

✅ Gradle check result for f241c28: SUCCESS

@jdddog jdddog force-pushed the msearch-include-named-queries-score branch from f241c28 to 7f2bed8 Compare October 8, 2025 03:57
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

✅ Gradle check result for 7f2bed8: SUCCESS

Contributed on behalf of DataCite – International Data Citation Initiative e.V.

Signed-off-by: James Diprose <[email protected]>
@jdddog jdddog force-pushed the msearch-include-named-queries-score branch from 7f2bed8 to c7f01b7 Compare October 8, 2025 20:28
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2025

✅ Gradle check result for c7f01b7: SUCCESS

@jdddog
Copy link
Author

jdddog commented Oct 9, 2025

Hey @msfroh, thanks for the tips about how to fix the issue, you couldn't take a look at the PR could you?

@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 the stalled Issues that have stalled label Nov 8, 2025
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:Query Capabilities stalled Issues that have stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] add support for include_named_queries_score in msearch

1 participant