Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit fddfc16

Browse files
minor change
1 parent ab5e7a8 commit fddfc16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/elasticsearch/index-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ Optional document\n
4444
4545
```
4646

47+
The document is optional, because `delete` actions do not require a document. The other actions (`index`, `create`, and `update`) all require a document. If you specifically want the action to fail if the document already exists, use the `create` action instead of the `index` action.
48+
{: .note }
49+
4750
To index bulk data using the `curl` command, navigate to the folder where you have your file saved and run the following command:
4851

4952
```json
5053
curl -H "Content-Type: application/x-ndjson" -POST https://localhost:9200/data/_bulk -u admin:admin --insecure --data-binary "@data.json"
5154
```
5255

53-
The document is optional, because `delete` actions do not require a document. The other actions (`index`, `create`, and `update`) all require a document. If you specifically want the action to fail if the document already exists, use the `create` action instead of the `index` action.
54-
{: .note }
55-
5656
If any one of the actions in the `_bulk` API fail, Elasticsearch continues to execute the other actions. Examine the `items` array in the response to figure out what went wrong. The entries in the `items` array are in the same order as the actions specified in the request.
5757

5858
Elasticsearch features automatic index creation when you add a document to an index that doesn't already exist. It also features automatic ID generation if you don't specify an ID in the request. This simple example automatically creates the movies index, indexes the document, and assigns it a unique ID:

0 commit comments

Comments
 (0)