error root cause type parse exception reason unknown key index for create index type parse exception reason unknown key index for create index status 400

0 votes

Hi Guys,

I am trying to upload my log data in the ElasticSearch engine. But I am getting this below error. 

$ curl -X PUT -H 'Content-Type: application/json' http://ElasticSearchIP:9200/mylogdb --data-binary @log.json 
{"error":{"root_cause":[{"type":"parse_exception","reason":"unknown key [index] for create index"}],"type":"parse_exception","reason":"unknown key [index] for create index"},"status":400}

Can anyone help me to solve this error?

Jun 16, 2020 in DevOps Tools by akhtar
• 38,170 points
737 views

1 answer to this question.

0 votes

Hi@akhtar,

As you are trying to upload your complete log in one go, so you need to use _bulk keyword in your command. You can use the below-given command.

$ curl -X PUT -H 'Content-Type: application/json' http://ElasticSearchIP:9200/mylogdb/_bulk --data-binary @log.json 

I hope this will help.

answered Jun 16, 2020 by MD
• 95,060 points

Related Questions In DevOps Tools

0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
949 views
+2 votes
1 answer
0 votes
1 answer