I am trying to bulk insert records to index asset_inventory_dev index. Elastic search is returning error saying “if _id is specified it must not be empty”.
Following is the request i tried from Kibana dev tools. I can see the _id fields are having some valid values.
Elasticstack version: v 7.10.1
POST /asset_inventory_dev/_bulk
{"index":{"_index":"asset_inventory_dev","_id":"62"}}
{"@timestamp":"2021-01-11T09:41:01.26+00:00","_id":"62","computer_id":"1065816795","computer_name":"PC123475367"}
Response:
{ "took" : 0, "ingest_took" : 0, "errors" : true, "items" : [ { "index" : { "_index" : "asset_inventory_dev", "_type" : "_doc", "_id" : "", "status" : 400, "error" : { "type" : "illegal_argument_exception", "reason" : "if _id is specified it must not be empty" } } } ] }
What is that i am missing in the above request?