Class PreAnalyzedMapper

  • All Implemented Interfaces:
    Cloneable, Iterable<org.elasticsearch.index.mapper.Mapper>, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

    public class PreAnalyzedMapper
    extends org.elasticsearch.index.mapper.FieldMapper
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PreAnalyzedMapper.Builder  
      static class  PreAnalyzedMapper.Defaults  
      static class  PreAnalyzedMapper.PreanalyzedFieldType  
      static class  PreAnalyzedMapper.PreAnalyzedTokenStream  
      static class  PreAnalyzedMapper.TypeParser
      Parses the mapping of a preanalyzed field, e.g.
      • Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.FieldMapper

        org.elasticsearch.index.mapper.FieldMapper.CopyTo, org.elasticsearch.index.mapper.FieldMapper.MultiFields
      • Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper

        org.elasticsearch.index.mapper.Mapper.BuilderContext
      • Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

        org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String CONTENT_TYPE  
      • Fields inherited from class org.elasticsearch.index.mapper.FieldMapper

        COERCE_SETTING, copyTo, fieldType, IGNORE_MALFORMED_SETTING, mappedFieldType, multiFields
      • Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

        EMPTY_PARAMS
    • Constructor Summary

      Constructors 
      Constructor Description
      PreAnalyzedMapper​(String simpleName, org.apache.lucene.document.FieldType fieldType, org.elasticsearch.index.mapper.MappedFieldType defaultFieldType, org.elasticsearch.index.mapper.FieldMapper.MultiFields multiFields, org.elasticsearch.index.mapper.FieldMapper.CopyTo copyTo, org.apache.lucene.document.FieldType fieldTypeText, org.apache.lucene.document.FieldType fieldTypeIndexed)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected String contentType()  
      protected void doXContentBody​(org.elasticsearch.common.xcontent.XContentBuilder builder, boolean includeDefaults, org.elasticsearch.common.xcontent.ToXContent.Params params)
      This is used to send all information about the mapper to places where it is used.
      PreAnalyzedMapper.PreanalyzedFieldType fieldType()  
      protected void mergeOptions​(org.elasticsearch.index.mapper.FieldMapper other, List<String> conflicts)  
      protected void parseCreateField​(org.elasticsearch.index.mapper.ParseContext context)  
      • Methods inherited from class org.elasticsearch.index.mapper.FieldMapper

        clone, copyTo, createFieldNamesField, docValuesByDefault, doXContentAnalyzers, indexedByDefault, indexOptionToString, iterator, merge, name, parse, parsesArrayValue, storedByDefault, termVectorOptionsToString, toXContent, typeName
      • Methods inherited from class org.elasticsearch.index.mapper.Mapper

        simpleName
      • Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

        isFragment
    • Constructor Detail

      • PreAnalyzedMapper

        public PreAnalyzedMapper​(String simpleName,
                                 org.apache.lucene.document.FieldType fieldType,
                                 org.elasticsearch.index.mapper.MappedFieldType defaultFieldType,
                                 org.elasticsearch.index.mapper.FieldMapper.MultiFields multiFields,
                                 org.elasticsearch.index.mapper.FieldMapper.CopyTo copyTo,
                                 org.apache.lucene.document.FieldType fieldTypeText,
                                 org.apache.lucene.document.FieldType fieldTypeIndexed)
    • Method Detail

      • doXContentBody

        protected void doXContentBody​(org.elasticsearch.common.xcontent.XContentBuilder builder,
                                      boolean includeDefaults,
                                      org.elasticsearch.common.xcontent.ToXContent.Params params)
                               throws IOException
        This is used to send all information about the mapper to places where it is used. If we wouldn't overwrite it and add the analyzers, declaring an analyzer in the mapping would have no effect despite being set in the builder.
        Overrides:
        doXContentBody in class org.elasticsearch.index.mapper.FieldMapper
        Throws:
        IOException
      • contentType

        protected String contentType()
        Specified by:
        contentType in class org.elasticsearch.index.mapper.FieldMapper
      • parseCreateField

        protected void parseCreateField​(org.elasticsearch.index.mapper.ParseContext context)
                                 throws IOException
        Specified by:
        parseCreateField in class org.elasticsearch.index.mapper.FieldMapper
        Throws:
        IOException
      • mergeOptions

        protected void mergeOptions​(org.elasticsearch.index.mapper.FieldMapper other,
                                    List<String> conflicts)
        Specified by:
        mergeOptions in class org.elasticsearch.index.mapper.FieldMapper