|
@@ -633,7 +633,7 @@ As a quick example, the following call indexes two documents (ID 1 - John Doe an
|
|
|
|
|
|
[source,js]
|
|
|
--------------------------------------------------
|
|
|
-POST /customer/_doc/_bulk?pretty
|
|
|
+POST /customer/_bulk?pretty
|
|
|
{"index":{"_id":"1"}}
|
|
|
{"name": "John Doe" }
|
|
|
{"index":{"_id":"2"}}
|
|
@@ -645,7 +645,7 @@ This example updates the first document (ID of 1) and then deletes the second do
|
|
|
|
|
|
[source,sh]
|
|
|
--------------------------------------------------
|
|
|
-POST /customer/_doc/_bulk?pretty
|
|
|
+POST /customer/_bulk?pretty
|
|
|
{"update":{"_id":"1"}}
|
|
|
{"doc": { "name": "John Doe becomes Jane Doe" } }
|
|
|
{"delete":{"_id":"2"}}
|
|
@@ -692,7 +692,7 @@ You can download the sample dataset (accounts.json) from https://github.com/elas
|
|
|
|
|
|
[source,sh]
|
|
|
--------------------------------------------------
|
|
|
-curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/_doc/_bulk?pretty&refresh" --data-binary "@accounts.json"
|
|
|
+curl -H "Content-Type: application/json" -XPOST "localhost:9200/bank/_bulk?pretty&refresh" --data-binary "@accounts.json"
|
|
|
curl "localhost:9200/_cat/indices?v"
|
|
|
--------------------------------------------------
|
|
|
// NOTCONSOLE
|