-
Notifications
You must be signed in to change notification settings - Fork 190
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
Add script fields support for multi search request #632
Add script fields support for multi search request #632
Conversation
Signed-off-by: Vacha Shah <[email protected]>
Signed-off-by: Vacha Shah <[email protected]>
Signed-off-by: Vacha Shah <[email protected]>
I get |
AFAIK it seems to be request serialization issue, notice
|
Oops, my bad sorry, this is |
Map<String, ScriptField> scriptFields = new HashMap<>(); | ||
scriptFields.put("test1", new ScriptField.Builder().script(Script.of(s -> s.inline(new InlineScript.Builder() | ||
.lang("painless") | ||
.source("ctx._source.quantity += params.inc") |
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 that should make it (apologies for the wrong hint before):
.source("ctx._source.quantity += params.inc") | |
.source("doc['quantity'].value + params.inc") |
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 @reta, that works!!
Signed-off-by: Vacha Shah <[email protected]>
java-client/src/main/java/org/opensearch/client/opensearch/core/msearch/MultisearchBody.java
Show resolved
Hide resolved
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-632-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8c97111f53f8d91f2550d8232aaf82daf8d7f384
# Push it to GitHub
git push --set-upstream origin backport/backport-632-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 |
…t#632) * Adding script_fields support for mseearch request with tests Signed-off-by: Vacha Shah <[email protected]> * Fixing logger in Search sample Signed-off-by: Vacha Shah <[email protected]> * Fixing build Signed-off-by: Vacha Shah <[email protected]> * Fixing tests Signed-off-by: Vacha Shah <[email protected]> --------- Signed-off-by: Vacha Shah <[email protected]>
* Adding script_fields support for mseearch request with tests * Fixing logger in Search sample * Fixing build * Fixing tests --------- Signed-off-by: Vacha Shah <[email protected]>
Description
Adding script_fields support to multi search requests.
Issues Resolved
Resolves #617
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.