I'm performing a small benchmark on an Elastic Search cluster. My benchmark script is written in bash and uses curl.
I'm writing the data to a file that I'm posting to the REST API:
curl -XPOST 'localhost:9200/benchmark/external/_bulk?pretty' \
--data @$DATAFILE
My $DATAFILE
is very simple, and has all newlines in place:
{"index":{"_id": "1"}}
{"data":"xxxxxxxxxx"}
{"index":{"_id": "2"}}
{"data":"xxxxxxxxxx"}
{"index":{"_id": "3"}}
{"data":"xxxxxxxxxx"}
...
But when I try to do my post I keep receiving the following error:
{
"error" : "ActionRequestValidationException[Validation Failed: 1: no requests added;]",
"status" : 400
}
I understand that my input is not validated, but why?