Pls Help me I'm stuck over here

{"error":{"root_cause":[{"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"}],"type":"not_x_content_exception","reason":"Compressor detection can only be called on some xcontent bytes or compressed xcontent bytes"},"status":500}

I Used this command curl -H "Content-Type: application/json" -XPUT "127.0.0.1:9200/ourlocations" -d @ourlocation.json -u elastic -p
On windows cmd as administrator

and this is the json
[
{"type":"scene","line_id":1,"play_name":"AboutOm","speaker":"Om is in Bombay"},
{"type":"scene","line_id":2,"play_name":"AboutOm","speaker":"Om was in Banglore"},
{"type":"scene","line_id":3,"play_name":"AboutOm","speaker":"Om Was in Pune"},
{"type":"scene","line_id":1,"play_name":"AboutSwati","speaker":"Swati is in Bombay"},
{"type":"scene","line_id":2,"play_name":"AboutSwati","speaker":"Swati was in Banglore"},
{"type":"scene","line_id":3,"play_name":"AboutSwati","speaker":"Swati Was in Pune"},
{"type":"scene","line_id":1,"play_name":"AboutVinu","speaker":"Vinu is in Bombay"},
{"type":"scene","line_id":2,"play_name":"AboutVinu","speaker":"Vinu was in Banglore"},
{"type":"scene","line_id":3,"play_name":"AboutVinu","speaker":"Vinu Was in Pune"}
]

You cannot insert an array of documents that way. Either insert one document at a time or use the bulk API, which will require your data to be adapted to the required format but does accept multiple documents in a single request.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.