I am trying to bulk index a 45 MB file using the bulk API on Elasticsearch. The docs say 'The endpoints are /_bulk, /{index}/_bulk, and {index}/{type}/_bulk. When the index or the index/type are provided, they will be used by default on bulk items that don’t provide them explicitly.'. So, I tried this:
curl -XPOST https://example-es-cluster.com/foo/bar/_bulk --data-binary @sample.json
where foo is the index, bar is the type and sample.json holds the required data. sample.json follows all guidelines, here are the contents.
cat sample.json {"foo": "bar", "baz": "qux"} {"foo": "bar1", "baz": "qux1"}
It also has a new line at the end of the file. However, I get the error: {"error":"ActionRequestValidationException[Validation Failed: 1: no requests added;]","status":400}
.
Any ideas or help please?