-
Notifications
You must be signed in to change notification settings - Fork 191
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
Fixing partial success results for msearch template #709
Fixing partial success results for msearch template #709
Conversation
Signed-off-by: Vacha Shah <vachshah@amazon.com>
Signed-off-by: Vacha Shah <vachshah@amazon.com>
Signed-off-by: Vacha Shah <vachshah@amazon.com>
3ddab57
to
4afc10a
Compare
@@ -62,14 +62,14 @@ private enum Kind { | |||
|
|||
private final ErrorCause error; | |||
|
|||
private final int status; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VachaShah hm I believe status
should be always present, we may have an issue on the server side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The server does not set a status for MultiSearchTemplateResponse (https://github.com/opensearch-project/OpenSearch/blob/main/modules/lang-mustache/src/main/java/org/opensearch/script/mustache/MultiSearchTemplateResponse.java#L169) whereas for MultiSearchResponse, it does https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java#L195.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this is something that should be fixed on the server side? I am not sure if there is any history behind not setting status for mutli search templates 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for digging it in @VachaShah !
Do you think this is something that should be fixed on the server side?
I believe so, the status field should always be set by the server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thank you @reta! I think we should still merge this fix though so that the users can use it with the current versions of OpenSearch, WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's right, no objection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I will raise an issue on OpenSearch to add the status field for multi search templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reta I opened an issue on the server for this: opensearch-project/OpenSearch#11133
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-709-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 99bb07a0eefa4e1aededccf016f8b4c3f64e5c3d
# Push it to GitHub
git push --set-upstream origin backport/backport-709-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
…ct#709) * Fixing partial success results for msearch template Signed-off-by: Vacha Shah <vachshah@amazon.com> * Adding changelog Signed-off-by: Vacha Shah <vachshah@amazon.com> * Spotless apply Signed-off-by: Vacha Shah <vachshah@amazon.com> --------- Signed-off-by: Vacha Shah <vachshah@amazon.com>
…ct#709) * Fixing partial success results for msearch template Signed-off-by: Vacha Shah <vachshah@amazon.com> * Adding changelog Signed-off-by: Vacha Shah <vachshah@amazon.com> * Spotless apply Signed-off-by: Vacha Shah <vachshah@amazon.com> --------- Signed-off-by: Vacha Shah <vachshah@amazon.com>
…ct#709) (opensearch-project#714) * Fixing partial success results for msearch template * Adding changelog * Spotless apply --------- Signed-off-by: Vacha Shah <vachshah@amazon.com>
Description
Same as title
Issues Resolved
Resolves #708
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.