# Server returned HTTP response code: 400 for URL, when sending a post request to elasticsearch?

**URL:** <https://discuss.elastic.co/t/server-returned-http-response-code-400-for-url-when-sending-a-post-request-to-elasticsearch/64408>\
**Category:** Elasticsearch\
**Created:** [October 31, 2016, 7:44am UTC](https://discuss.elastic.co/t/server-returned-http-response-code-400-for-url-when-sending-a-post-request-to-elasticsearch/64408 "2016-10-31T07:44:37Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Kulasangar\_Gowrisang](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@Kulasangar\_Gowrisang](https://discuss.elastic.co/u/Kulasangar_Gowrisang)\
**Post date:** [October 31, 2016, 10:12am UTC](https://discuss.elastic.co/t/server-returned-http-response-code-400-for-url-when-sending-a-post-request-to-elasticsearch/64408/9 "2016-10-31T10:12:30Z")

</div>

@xavierfacq Nop, would that make any difference?

What I found was [this](https://discuss.elastic.co/t/kibana-5-alpha-4-script-in-json-input/56827/2). According to this I changed my `aggs` and it's working once I recreated the index using a `PUT` and then tried pushing data to that index.

Once I query, it's working now. But then without recreating the whole thing is there any way I could insert the `"fielddata": true` for the existing index I've got at the moment? 🤔

---

_[View the full topic](https://discuss.elastic.co/t/server-returned-http-response-code-400-for-url-when-sending-a-post-request-to-elasticsearch/64408)._
