Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

change update script add params #768

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions 030_Data/45_Partial_update.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,15 @@ another tag:

[source,js]
--------------------------------------------------
POST /website/blog/1/_update
POST website/blog/1/_update
{
"script" : "ctx._source.tags+=new_tag",
"params" : {
"new_tag" : "search"
}
"script": {
"source": "ctx._source.tags.add(params.tag)",
"lang": "painless",
"params": {
"tag": "search"
}
}
}
--------------------------------------------------
// SENSE: 030_Data/45_Partial_update.json
Expand Down