Docs: Update update.asciidoc

Closes #7498
This commit is contained in:
nandakishore15 2014-08-28 17:48:31 +05:30 committed by Clinton Gormley
parent e3c7f28003
commit ee2503d01d
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ We can also add a new field to the document:
[source,js]
--------------------------------------------------
curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
"script" : "ctx._source.text = \"some text\""
"script" : "ctx._source.name_of_new_field = \"value_of_new_field\""
}'
--------------------------------------------------
@ -62,7 +62,7 @@ We can also remove a field from the document:
[source,js]
--------------------------------------------------
curl -XPOST 'localhost:9200/test/type1/1/_update' -d '{
"script" : "ctx._source.remove(\"text\")"
"script" : "ctx._source.remove(\"name_of_field\")"
}'
--------------------------------------------------