浏览代码

Fix docs that uses += to add an element in a list even though painless does not accept it.

Jim Ferenczi 9 年之前
父节点
当前提交
dc663a432b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      docs/reference/docs/update.asciidoc

+ 2 - 2
docs/reference/docs/update.asciidoc

@@ -48,7 +48,7 @@ will still add it, since its a list):
 --------------------------------------------------
 curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
     "script" : {
-        "inline": "ctx._source.tags += params.tag",
+        "inline": "ctx._source.tags.add(params.tag)",
         "lang": "painless",
         "params" : {
             "tag" : "blue"
@@ -247,7 +247,7 @@ Timeout waiting for a shard to become available.
 
 `wait_for_active_shards`::
 
-The number of shard copies required to be active before proceeding with the update operation. 
+The number of shard copies required to be active before proceeding with the update operation.
 See <<index-wait-for-active-shards,here>> for details.
 
 `refresh`::