Skip to content

Commit accb636

Browse files
authored
Merge pull request #20213 from jimferenczi/painless_list_add
Fix docs that uses += to add an element in a list even though painless does not accept it.
2 parents b4245c7 + dc663a4 commit accb636

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/reference/docs/update.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ will still add it, since its a list):
4848
--------------------------------------------------
4949
curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
5050
"script" : {
51-
"inline": "ctx._source.tags += params.tag",
51+
"inline": "ctx._source.tags.add(params.tag)",
5252
"lang": "painless",
5353
"params" : {
5454
"tag" : "blue"
@@ -247,7 +247,7 @@ Timeout waiting for a shard to become available.
247247

248248
`wait_for_active_shards`::
249249

250-
The number of shard copies required to be active before proceeding with the update operation.
250+
The number of shard copies required to be active before proceeding with the update operation.
251251
See <<index-wait-for-active-shards,here>> for details.
252252

253253
`refresh`::

0 commit comments

Comments
 (0)