Sai Sri Krishna Kotha
Sai Sri Krishna Kotha

Reputation: 113

Unable to import json array file to elasticsearch index?

I have tried to import json array file into elasticsearch using following commands,

curl -XPOST 'http://localhost:9200/unified/post/1' -d @unified.json

and

curl -XPOST 'http://localhost:9200/unified/post/_bulk' --data-binary @unified_1.json

But, it is throwing error message as

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"failed to parse"}],"type":"mapper_parsing_exception","reason":"failed to parse","caused_by":{"type":"not_x _content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}},"status":400}

Can anyone help me with this problem.

Upvotes: 0

Views: 1120

Answers (1)

ziad
ziad

Reputation: 404

The issue is with "@unified_1.json". It seems that the data inside is does not follow the appropriate json structure that is required.

Upvotes: 0

Related Questions