-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[BUG FIX] Fix the visit of inner query for NestedQueryBuilder #14739
Conversation
Signed-off-by: zhichao-aws <[email protected]>
❌ Gradle check result for 1985a21: 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? |
Signed-off-by: zhichao-aws <[email protected]>
Please help add a backport label for this PR |
Hi @vibrantvarun @msfroh, could you please take a look at this PR? As you're the author and reviewer of #10110 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14739 +/- ##
============================================
+ Coverage 71.78% 71.87% +0.08%
+ Complexity 62694 62692 -2
============================================
Files 5160 5160
Lines 294211 294215 +4
Branches 42553 42554 +1
============================================
+ Hits 211212 211457 +245
+ Misses 65599 65338 -261
- Partials 17400 17420 +20 ☔ View full report in Codecov by Sentry. |
Add the changelog |
Hi @kotwanikunal , could you please help merge this PR? |
@zhichao-aws Can you please rebase? It looks like you have conflicts. |
Signed-off-by: zhichao-aws <[email protected]>
Sure |
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
@zhichao-aws what is the status of this PR? |
I had marked this for 2.16 as it's a pretty straightforward bug fix that we should have merged a while ago. If it doesn't make it to 2.16 it's ok. |
The backport to
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.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-14739-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fcc231dfc349e092c3f68e49f49e32a062313f71
# Push it to GitHub
git push --set-upstream origin backport/backport-14739-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
The backport to
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.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.16
# Create a new branch
git switch --create backport/backport-14739-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fcc231dfc349e092c3f68e49f49e32a062313f71
# Push it to GitHub
git push --set-upstream origin backport/backport-14739-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.16 Then, create a pull request where the |
@zhichao-aws can you please backport this manually to 2.x? Thanks. |
…arch-project#14739) * fix nested query visit subquery Signed-off-by: zhichao-aws <[email protected]> * add change log Signed-off-by: zhichao-aws <[email protected]> --------- Signed-off-by: zhichao-aws <[email protected]> Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]> Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
…arch-project#14739) * fix nested query visit subquery Signed-off-by: zhichao-aws <[email protected]> * add change log Signed-off-by: zhichao-aws <[email protected]> --------- Signed-off-by: zhichao-aws <[email protected]> Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]> Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
Description
In #10110 we add visitor design pattern in QueryBuilder. For this pattern, compound query need to manage the visit for the sub-query. It gets the child visitor and use it to visit the sub-query in the
visit
method.However, we didn't implement the
visit
method for NestedQueryBuilder. And as a result some query processors can not work for the NestedQueryBuilder. ref: opensearch-project/neural-search#813In this PR we implement the visit method in NestedQueryBuilder. The coding style is consistent with previous PR #10110.
Related Issues
#10110
opensearch-project/neural-search#813
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.