diff --git a/src/main/java/org/elasticsearch/index/mapper/internal/TTLFieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/internal/TTLFieldMapper.java index d9f672e4c72..06908dfe1cf 100644 --- a/src/main/java/org/elasticsearch/index/mapper/internal/TTLFieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/internal/TTLFieldMapper.java @@ -218,6 +218,11 @@ public class TTLFieldMapper extends LongFieldMapper implements InternalMapper, R @Override public void merge(Mapper mergeWith, MergeContext mergeContext) throws MergeMappingException { - // do nothing here, no merging, but also no exception + TTLFieldMapper ttlMergeWith = (TTLFieldMapper) mergeWith; + if (!mergeContext.mergeFlags().simulate()) { + if (ttlMergeWith.defaultTTL != -1) { + this.defaultTTL = ttlMergeWith.defaultTTL; + } + } } }