# Index Mapping Issue - Getting Error: "reason" : "object mapping \[locations\] can't be changed from nested to non-nested"

**URL:** <https://discuss.elastic.co/t/index-mapping-issue-getting-error-reason-object-mapping-locations-cant-be-changed-from-nested-to-non-nested/227938>\
**Category:** Elasticsearch\
**Created:** [April 14, 2020, 2:42pm UTC](https://discuss.elastic.co/t/index-mapping-issue-getting-error-reason-object-mapping-locations-cant-be-changed-from-nested-to-non-nested/227938 "2020-04-14T14:42:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 14, 2020, 2:55pm UTC](https://discuss.elastic.co/t/index-mapping-issue-getting-error-reason-object-mapping-locations-cant-be-changed-from-nested-to-non-nested/227938/2 "2020-04-14T14:55:41Z")

</div>

Welcome!

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with `</>` icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

_[View the full topic](https://discuss.elastic.co/t/index-mapping-issue-getting-error-reason-object-mapping-locations-cant-be-changed-from-nested-to-non-nested/227938)._
