I want to add the following line which is in a separate JSON file using the bulk API
{"index":{"_id":"53e23f5ae4b0ef99cb360835"}}
I use the command
curl -XPOST -H 'Content-Type: application/json' localhost:9200/cheapest_offers/_bulk --data-binary Downloads/test/test.json
And get the error
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The bulk request must be terminated by a newline [\n]"}],"type":"illegal_argument_exception","reason":"The bulk request must be terminated by a newline [\n]"},"status":400}
PS: The file clearly contains an empty line at the end!
Can anyone explain this?