Exemplo n.º 1
0
 @Override
 public DateFieldMapper build(BuilderContext context) {
   fieldType.setOmitNorms(fieldType.omitNorms() && boost == 1.0f);
   if (!locale.equals(dateTimeFormatter.locale())) {
     dateTimeFormatter =
         new FormatDateTimeFormatter(
             dateTimeFormatter.format(),
             dateTimeFormatter.parser(),
             dateTimeFormatter.printer(),
             locale);
   }
   DateFieldMapper fieldMapper =
       new DateFieldMapper(
           buildNames(context),
           dateTimeFormatter,
           fieldType.numericPrecisionStep(),
           boost,
           fieldType,
           docValues,
           nullValue,
           timeUnit,
           ignoreMalformed(context),
           coerce(context),
           postingsProvider,
           docValuesProvider,
           similarity,
           normsLoading,
           fieldDataSettings,
           context.indexSettings(),
           multiFieldsBuilder.build(this, context),
           copyTo);
   fieldMapper.includeInAll(includeInAll);
   return fieldMapper;
 }