diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/core/DateFieldMapper.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/core/DateFieldMapper.java index 6d8cc1af63f..33446726191 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/core/DateFieldMapper.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/mapper/core/DateFieldMapper.java @@ -113,7 +113,7 @@ public class DateFieldMapper extends NumberFieldMapper { builder.nullValue(propNode.toString()); } else if (propName.equals("format")) { builder.dateTimeFormatter(parseDateTimeFormatter(propName, propNode)); - } else if (propName.equals("numeric_precision")) { + } else if (propName.equals("numeric_resolution")) { builder.timeUnit(TimeUnit.valueOf(propNode.toString().toUpperCase())); } } @@ -348,7 +348,7 @@ public class DateFieldMapper extends NumberFieldMapper { builder.field("include_in_all", includeInAll); } if (timeUnit != Defaults.TIME_UNIT) { - builder.field("numeric_precision", timeUnit); + builder.field("numeric_resolution", timeUnit); } }