use "numeric_resolution" instead of "numeric_precision" as the field name

This commit is contained in:
Njal Karevoll 2011-09-20 21:09:37 +02:00 committed by Shay Banon
parent 41dbcdb7d6
commit 9bc9e3f0bd
1 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ public class DateFieldMapper extends NumberFieldMapper<Long> {
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<Long> {
builder.field("include_in_all", includeInAll);
}
if (timeUnit != Defaults.TIME_UNIT) {
builder.field("numeric_precision", timeUnit);
builder.field("numeric_resolution", timeUnit);
}
}