diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/object/RootObjectMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/object/RootObjectMapper.java index a711540f584..c1e65fd391d 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/object/RootObjectMapper.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/object/RootObjectMapper.java @@ -256,7 +256,7 @@ public class RootObjectMapper extends ObjectMapper { } if (dateDetection != Defaults.DATE_DETECTION) { - builder.field("date_detection", Defaults.DATE_DETECTION); + builder.field("date_detection", dateDetection); } } }