Class TextFieldMapper

java.lang.Object
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<Mapper>, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class TextFieldMapper
extends FieldMapper
A FieldMapper for full-text fields.
  • Field Details

  • Constructor Details

  • Method Details

    • getMergeBuilder

      public FieldMapper.Builder getMergeBuilder()
      Description copied from class: FieldMapper
      Returns a FieldMapper.Builder to be used for merging and serialization Implement as follows: return new MyBuilder(simpleName()).init(this);
      Specified by:
      getMergeBuilder in class FieldMapper
    • parseCreateField

      protected void parseCreateField​(ParseContext context) throws java.io.IOException
      Description copied from class: FieldMapper
      Parse the field value and populate the fields on ParseContext.doc(). Implementations of this method should ensure that on failing to parse parser.currentToken() must be the current failing token
      Specified by:
      parseCreateField in class FieldMapper
      Throws:
      java.io.IOException
    • contentType

      protected java.lang.String contentType()
      Specified by:
      contentType in class FieldMapper
    • fieldType

      public TextFieldMapper.TextFieldType fieldType()
      Overrides:
      fieldType in class FieldMapper
    • createPhraseQuery

      public static org.apache.lucene.search.Query createPhraseQuery​(org.apache.lucene.analysis.TokenStream stream, java.lang.String field, int slop, boolean enablePositionIncrements) throws java.io.IOException
      Throws:
      java.io.IOException
    • createPhrasePrefixQuery

      public static org.apache.lucene.search.Query createPhrasePrefixQuery​(org.apache.lucene.analysis.TokenStream stream, java.lang.String field, int slop, int maxExpansions, java.lang.String prefixField, java.util.function.IntPredicate usePrefixField) throws java.io.IOException
      Throws:
      java.io.IOException
    • doXContentBody

      protected void doXContentBody​(org.elasticsearch.common.xcontent.XContentBuilder builder, boolean includeDefaults, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Overrides:
      doXContentBody in class FieldMapper
      Throws:
      java.io.IOException