Add script fields support for multi search request#632
Add script fields support for multi search request#632dblock merged 4 commits intoopensearch-project:mainfrom
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>
|
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.
@VachaShah that should make it (apologies for the wrong hint before):
| .source("ctx._source.quantity += params.inc") | |
| .source("doc['quantity'].value + params.inc") |
Signed-off-by: Vacha Shah <vachshah@amazon.com>
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.xThen, create a pull request where the |
…t#632) * Adding script_fields support for mseearch request with tests Signed-off-by: Vacha Shah <vachshah@amazon.com> * Fixing logger in Search sample Signed-off-by: Vacha Shah <vachshah@amazon.com> * Fixing build Signed-off-by: Vacha Shah <vachshah@amazon.com> * Fixing tests Signed-off-by: Vacha Shah <vachshah@amazon.com> --------- Signed-off-by: Vacha Shah <vachshah@amazon.com>
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.