Hi I am trying to load a sample data set referring elastic search docs but when I am trying to run the instructed command, I am getting the below error. I have read all documents but I am unable to resolve it.
$ curl -XPOST 'localhost:9200/bank/account/_bulk?pretty' --data-binary @accounts.json Warning: Couldn't read data from file "accounts.json", this makes an empty Warning: POST. { "error" : { "root_cause" : [ { "type" : "parse_exception", "reason" : "Failed to derive xcontent" } ], "type" : "parse_exception", "reason" : "Failed to derive xcontent" }, "status" : 400 }
First few lines in accounts.json is:-
{"account_number":736,"balance":28677,"firstname":"Rogers","lastname":"Mcmahon","age":21,"gender":"F","address":"423 Cameron Court","employer":"Brainclip","email":"rogersmcmahon@brainclip.com","city":"Saddlebrooke","state":"FL"} {"index":{"_id":"743"}} {"account_number":743,"balance":14077,"firstname":"Susana","lastname":"Moody","age":23,"gender":"M","address":"842 Fountain Avenue","employer":"Bitrex","email":"susanamoody@bitrex.com","city":"Temperanceville","state":"TN"} {"index":{"_id":"748"}} {"account_number":748,"balance":38060,"firstname":"Ford","lastname":"Branch","age":25,"gender":"M","address":"926 Cypress Avenue","employer":"Buzzness","email":"fordbranch@buzzness.com","city":"Beason","state":"DC"} {"index":{"_id":"750"}}
I have also referred Bulk API doc of ES
I am able to create single index but due to unknown reasons I am not able to index bulk documents.