# Pls Help me I'm stuck over here

**URL:** <https://discuss.elastic.co/t/pls-help-me-im-stuck-over-here/307601>\
**Category:** Elasticsearch\
**Created:** [June 20, 2022, 5:03am UTC](https://discuss.elastic.co/t/pls-help-me-im-stuck-over-here/307601 "2022-06-20T05:03:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Draco\_King](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/draco_king/32/107254_2.png) [@Draco\_King](https://discuss.elastic.co/u/Draco_King)\
**Post date:** [June 20, 2022, 5:03am UTC](https://discuss.elastic.co/t/pls-help-me-im-stuck-over-here/307601/1 "2022-06-20T05:03:26Z")

</div>

{"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"}  
]

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [June 20, 2022, 5:53am UTC](https://discuss.elastic.co/t/pls-help-me-im-stuck-over-here/307601/2 "2022-06-20T05:53:04Z")

</div>

You cannot insert an array of documents that way. Either insert one document at a time or use the [bulk API](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/docs-bulk.html), which will require your data to be adapted to the required format but does accept multiple documents in a single request.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 18, 2022, 5:54am UTC](https://discuss.elastic.co/t/pls-help-me-im-stuck-over-here/307601/3 "2022-07-18T05:54:00Z")

</div>

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