[Elasticsearch] json bulk insert.

Elastic/Elasticsearch 2013. 8. 14. 12:09

참고 사이트 : http://www.elasticsearch.org/guide/reference/api/bulk/


[Run]

curl -s -XPOST 'http://192.168.56.104:9200/test/_bulk' --data-binary @test.json


[test.json]

{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "1" , "_routing" : "1" } }

{"docid":1, "title":"title1"}

{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "2" , "_routing" : "1" } }

{"docid":2, "title":"title2"}

{ "index" : { "_index" : "test", "_type" : "type1", "_id" : "3" , "_routing" : "1" } }

{"docid":3, "title":"title3"}



: