How to install bulk data into elasticsearch via curl

How to a upload a bulk data to elastic search via curl..

you have a full example here: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html

curl -X POST "localhost:9200/_bulk?pretty" -H 'Content-Type: application/json' -d'
{ "index" : { "_index" : "test", "_id" : "1" } }
{ "field1" : "value1" }
{ "delete" : { "_index" : "test", "_id" : "2" } }
{ "create" : { "_index" : "test", "_id" : "3" } }
{ "field1" : "value3" }
{ "update" : {"_id" : "1", "_index" : "test"} }
{ "doc" : {"field2" : "value2"} }
'

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.