Exemplo n.º 1
0
 @Override
 public TextFieldMapper includeInAllIfNotSet(Boolean includeInAll) {
   if (includeInAll != null && this.includeInAll == null) {
     TextFieldMapper clone = clone();
     clone.includeInAll = includeInAll;
     return clone;
   } else {
     return this;
   }
 }
Exemplo n.º 2
0
 @Override
 public TextFieldMapper unsetIncludeInAll() {
   if (includeInAll != null) {
     TextFieldMapper clone = clone();
     clone.includeInAll = null;
     return clone;
   } else {
     return this;
   }
 }
Exemplo n.º 3
0
 @Override
 public TextFieldMapper build(BuilderContext context) {
   if (positionIncrementGap != POSITION_INCREMENT_GAP_USE_ANALYZER) {
     fieldType.setIndexAnalyzer(
         new NamedAnalyzer(fieldType.indexAnalyzer(), positionIncrementGap));
     fieldType.setSearchAnalyzer(
         new NamedAnalyzer(fieldType.searchAnalyzer(), positionIncrementGap));
     fieldType.setSearchQuoteAnalyzer(
         new NamedAnalyzer(fieldType.searchQuoteAnalyzer(), positionIncrementGap));
   }
   setupFieldType(context);
   TextFieldMapper fieldMapper =
       new TextFieldMapper(
           name,
           fieldType,
           defaultFieldType,
           positionIncrementGap,
           context.indexSettings(),
           multiFieldsBuilder.build(this, context),
           copyTo);
   return fieldMapper.includeInAll(includeInAll);
 }