Skip to content

Fix: visit of inner query for FunctionScoreQueryBuilder#16776

Merged
gaobinlong merged 4 commits intoopensearch-project:mainfrom
kodieg:main
Mar 13, 2025
Merged

Fix: visit of inner query for FunctionScoreQueryBuilder#16776
gaobinlong merged 4 commits intoopensearch-project:mainfrom
kodieg:main

Conversation

@kodieg
Copy link
Copy Markdown
Contributor

@kodieg kodieg commented Dec 4, 2024

Description

This is version of #15404 cherrypicked on main.

Similar to #14739, but implements the visit method in FunctionScoreQueryBuilder to allow subqueries to be processed properly.

Related Issues

Resolves #15403
Similar to #15034

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
Copy Markdown
Contributor

github-actions bot commented Dec 4, 2024

✅ Gradle check result for 8339029: SUCCESS

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 4, 2024

Codecov Report

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

Project coverage is 72.33%. Comparing base (e306d51) to head (25d411e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...query/functionscore/FunctionScoreQueryBuilder.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16776      +/-   ##
============================================
+ Coverage     72.27%   72.33%   +0.05%     
- Complexity    65611    65674      +63     
============================================
  Files          5311     5311              
  Lines        304942   304946       +4     
  Branches      44225    44226       +1     
============================================
+ Hits         220407   220584     +177     
+ Misses        66448    66269     -179     
- Partials      18087    18093       +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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 6, 2024

❌ Gradle check result for 48eae48: 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?

jdnvn added 3 commits December 10, 2024 11:35
Signed-off-by: jdnvn <joe@donovan.to>
Signed-off-by: jdnvn <joe@donovan.to>
Signed-off-by: Konrad Gołuchowski <konrad.goluchowski@synerise.com>
@github-actions
Copy link
Copy Markdown
Contributor

✅ Gradle check result for 19c5597: SUCCESS

@gaobinlong gaobinlong added the backport 2.x Backport to 2.x branch label Dec 11, 2024
@opensearch-trigger-bot
Copy link
Copy Markdown
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 Jan 11, 2025
Signed-off-by: gaobinlong <gbinlong@amazon.com>
@github-actions
Copy link
Copy Markdown
Contributor

❕ Gradle check result for 25d411e: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode

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

@gaobinlong gaobinlong merged commit 5a4c510 into opensearch-project:main Mar 13, 2025
33 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 13, 2025
* add visitor logic to FunctionScoreQueryBuilder

Signed-off-by: jdnvn <joe@donovan.to>

* update changelog

Signed-off-by: jdnvn <joe@donovan.to>

* add assertion that inner query builder was visited

Signed-off-by: Konrad Gołuchowski <konrad.goluchowski@synerise.com>

---------

Signed-off-by: jdnvn <joe@donovan.to>
Signed-off-by: Konrad Gołuchowski <konrad.goluchowski@synerise.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: jdnvn <joe@donovan.to>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
(cherry picked from commit 5a4c510)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dbwiddis pushed a commit that referenced this pull request Mar 13, 2025
)

* add visitor logic to FunctionScoreQueryBuilder



* update changelog



* add assertion that inner query builder was visited



---------






(cherry picked from commit 5a4c510)

Signed-off-by: jdnvn <joe@donovan.to>
Signed-off-by: Konrad Gołuchowski <konrad.goluchowski@synerise.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jdnvn <joe@donovan.to>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
vinaykpud pushed a commit to vinaykpud/OpenSearch that referenced this pull request Mar 18, 2025
…roject#16776)

* add visitor logic to FunctionScoreQueryBuilder

Signed-off-by: jdnvn <joe@donovan.to>

* update changelog

Signed-off-by: jdnvn <joe@donovan.to>

* add assertion that inner query builder was visited

Signed-off-by: Konrad Gołuchowski <konrad.goluchowski@synerise.com>

---------

Signed-off-by: jdnvn <joe@donovan.to>
Signed-off-by: Konrad Gołuchowski <konrad.goluchowski@synerise.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: jdnvn <joe@donovan.to>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: Vinay Krishna Pudyodu <vinkrish.neo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch bug Something isn't working Search:Query Capabilities stalled Issues that have stalled

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Cannot make use of default_model_id in function_score query type

2 participants