コード例 #1
0
 @Override
 public FieldNamesFieldMapper build(BuilderContext context) {
   setupFieldType(context);
   FieldNamesFieldType fieldNamesFieldType = (FieldNamesFieldType) fieldType;
   fieldNamesFieldType.setEnabled(enabled);
   return new FieldNamesFieldMapper(fieldType, fieldDataSettings, context.indexSettings());
 }
コード例 #2
0
 public FieldNamesFieldMapper(MappedFieldType fieldType, Settings indexSettings) {
   super(NAME, fieldType, Defaults.FIELD_TYPE, indexSettings);
   this.pre13Index = Version.indexCreated(indexSettings).before(Version.V_1_3_0);
   if (this.pre13Index) {
     FieldNamesFieldType newFieldType = fieldType().clone();
     newFieldType.setEnabled(false);
     newFieldType.freeze();
     fieldTypeRef.set(newFieldType);
   }
 }