I'm trying to index multiple docs on a single action (index), is there any way to avoid repeating the action with each document in the input.
curl -XPOST 'https://localhost:9200/myindex/mytype/_bulk?pretty' -H 'Content-Type: application/json' -d'
{"index" : {}}
{ "field1" : "value1","field2": "value2"}
{"index" : {}}
{ "field1" : "value12","field2": "value22"}
'
In this case , is there any way to avoid repeating {"index" : {}} before each document ?
I do not see a way to avoid repeating the {"index" : {}} before each document, but I made it easier to do so by using the find and replace on my notepad.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.