# Don't merge mappings when an existing mapping is updated

**URL:** <https://discuss.elastic.co/t/dont-merge-mappings-when-an-existing-mapping-is-updated/10728>\
**Category:** Elasticsearch\
**Created:** [February 13, 2013, 4:23pm UTC](https://discuss.elastic.co/t/dont-merge-mappings-when-an-existing-mapping-is-updated/10728 "2013-02-13T16:23:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rolftimmermans](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rolftimmermans/32/2489_2.png) [@rolftimmermans](https://discuss.elastic.co/u/rolftimmermans)\
**Post date:** [February 13, 2013, 4:23pm UTC](https://discuss.elastic.co/t/dont-merge-mappings-when-an-existing-mapping-is-updated/10728/1 "2013-02-13T16:23:42Z")

</div>

Hi,

We have an application where elasticsearch mappings are created based on  
existing schemas. When the existing schemas change, the mapping in  
elasticsearch should be updated. Usually fields are added, and it works  
fine.

Sometimes, however, fields are deleted. If we post the updated mapping to  
elasticsearch we want this to fail (because elasticsearch cannot delete  
fields). However, elasticsearch silently merges the mappings, causing BOTH  
fields to be present. Is there any way to disable merging? We only want to  
allow mapping updates if they include all fields that were present when the  
mapping was created.

Thanks!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:51am UTC](https://discuss.elastic.co/t/dont-merge-mappings-when-an-existing-mapping-is-updated/10728/2 "2017-07-06T02:51:37Z")

</div>

Closed on July 6, 2017, 2:51am UTC


