Skip to content

Conversation

@gaobinlong
Copy link
Contributor

@gaobinlong gaobinlong commented Jul 21, 2025

Description

When sorting by _score and search_after is not null, ScoreDoc should be used rather than FieldDoc when constructing TopScoreDocCollectorManager(), we should change the parameter as the PR in lucene has been merged yet.

Related Issues

No issue.

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.

…nager to avoid unnecessary conversion

Signed-off-by: Binlong Gao <[email protected]>
Signed-off-by: Binlong Gao <[email protected]>
@github-actions
Copy link
Contributor

❌ Gradle check result for 937b960: 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

✅ Gradle check result for 937b960: SUCCESS

@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.74%. Comparing base (42a1dd2) to head (937b960).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...ensearch/search/query/TopDocsCollectorContext.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #18802      +/-   ##
============================================
- Coverage     72.80%   72.74%   -0.06%     
+ Complexity    68564    68552      -12     
============================================
  Files          5567     5567              
  Lines        314844   314844              
  Branches      45675    45675              
============================================
- Hits         229227   229046     -181     
- Misses        67028    67215     +187     
+ Partials      18589    18583       -6     

☔ 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.

@reta reta merged commit 358878a into opensearch-project:main Jul 22, 2025
31 of 34 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.19 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.19 2.19
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.19
# Create a new branch
git switch --create backport/backport-18802-to-2.19
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 358878a30ab558b98c882a0aa0a631e12ec24e9f
# Push it to GitHub
git push --set-upstream origin backport/backport-18802-to-2.19
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.19

Then, create a pull request where the base branch is 2.19 and the compare/head branch is backport/backport-18802-to-2.19.

@reta
Copy link
Contributor

reta commented Jul 22, 2025

@gaobinlong do you mind backporting to 2.19 please? thank you

gaobinlong added a commit to gaobinlong/OpenSearch that referenced this pull request Jul 23, 2025
…nager to avoid unnecessary conversion (opensearch-project#18802)

* Use ScoreDoc instead of FieldDoc when creating TopScoreDocCollectorManager to avoid unnecessary conversion

Signed-off-by: Binlong Gao <[email protected]>

* Modify change log

Signed-off-by: Binlong Gao <[email protected]>

---------

Signed-off-by: Binlong Gao <[email protected]>
reta pushed a commit that referenced this pull request Jul 23, 2025
…reDocCollectorManager to avoid unnecessary conversion (#18821)

* Use ScoreDoc instead of FieldDoc when creating TopScoreDocCollectorManager to avoid unnecessary conversion (#18802)

* Use ScoreDoc instead of FieldDoc when creating TopScoreDocCollectorManager to avoid unnecessary conversion

Signed-off-by: Binlong Gao <[email protected]>

* Modify change log

Signed-off-by: Binlong Gao <[email protected]>

---------

Signed-off-by: Binlong Gao <[email protected]>

* Format the code

Signed-off-by: Binlong Gao <[email protected]>

---------

Signed-off-by: Binlong Gao <[email protected]>
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
…nager to avoid unnecessary conversion (opensearch-project#18802)

* Use ScoreDoc instead of FieldDoc when creating TopScoreDocCollectorManager to avoid unnecessary conversion

Signed-off-by: Binlong Gao <[email protected]>

* Modify change log

Signed-off-by: Binlong Gao <[email protected]>

---------

Signed-off-by: Binlong Gao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19 backport-failed Search Search query, autocomplete ...etc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants