Cheaper in Bulk

https://www.elastic.co/guide/en/elasticsearch/guide/current/bulk.html

 

Don’t Repeat Yourselfedit

Perhaps you are batch-indexing logging data into the same index, and with the same type. Having to specify the same metadata for every document is a waste. Instead, just as for the mget API, the bulk request accepts a default /_index or /_index/_type in the URL:

POST /website/_bulk
{ "index": { "_type": "log" }}
{ "event": "User logged in" }
 
Copy as cURLView in Sense

You can still override the _index and _type in the metadata line, but it will use the values in the URL as defaults:

POST /website/log/_bulk
{ "index": {}}
{ "event": "User logged in" }
{ "index": { "_type": "blog" }}
{ "title": "Overriding the default type" }