I recently upgraded to Elasticsearch version 6.1.1 and now I can\'t bulk index documents from a JSON file. When I do it inline, it works fine. Here are the contents of the d
I faced the similar issue on windows using elastic 7.9.1 when i used below CURL command.
curl -s -H "Content-Type: application/json" -XPOST localhost:9200/accounts/docs/_bulk?filter_path=items.*.error --data-binary "@textoutES.json" >> erroredAtES.json"
I tried to manually add Newline at the end of file but did not work.
I have created my JSON by extracting data from mysql database like below to make sure my records should end with LINE FEED and CARRIAGE RETURN.
Then, it is working for me.
SELECT CONCAT('{"index":{"_id":"',id,'"}}\r\n',request_data,'\r\n') reqestData FROM cards
More Importantly you End-of-File should have a carriage-return and Line-Feed (CRLF)if you are using windows. Also if any line in JSON contains a CR but no LF then you will get parsing exception "Source: org.elasticsearch.common.bytes.BytesReference$MarkSupportingStreamInputWrapper@2d5ed2ca"
Windows CRLF and EOF