Don't merge mappings when an existing mapping is updated


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

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.


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
For more options, visit