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,260 points
2,990 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,460 points

Related Questions In DevOps Tools

+1 vote
2 answers
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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,036 views
+2 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP