Class PreAnalyzedMapper
- java.lang.Object
-
- org.elasticsearch.index.mapper.Mapper
-
- org.elasticsearch.index.mapper.FieldMapper
-
- org.elasticsearch.index.mapper.preanalyzed.PreAnalyzedMapper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPreAnalyzedMapper.Builderstatic classPreAnalyzedMapper.Defaultsstatic classPreAnalyzedMapper.PreanalyzedFieldTypestatic classPreAnalyzedMapper.PreAnalyzedTokenStreamstatic classPreAnalyzedMapper.TypeParserParses 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
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONTENT_TYPE
-
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 StringcontentType()protected voiddoXContentBody(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.PreanalyzedFieldTypefieldType()protected voidmergeOptions(org.elasticsearch.index.mapper.FieldMapper other, List<String> conflicts)protected voidparseCreateField(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 java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CONTENT_TYPE
public static final String CONTENT_TYPE
- See Also:
- Constant Field Values
-
-
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 IOExceptionThis 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:
doXContentBodyin classorg.elasticsearch.index.mapper.FieldMapper- Throws:
IOException
-
fieldType
public PreAnalyzedMapper.PreanalyzedFieldType fieldType()
- Overrides:
fieldTypein classorg.elasticsearch.index.mapper.FieldMapper
-
contentType
protected String contentType()
- Specified by:
contentTypein classorg.elasticsearch.index.mapper.FieldMapper
-
parseCreateField
protected void parseCreateField(org.elasticsearch.index.mapper.ParseContext context) throws IOException- Specified by:
parseCreateFieldin classorg.elasticsearch.index.mapper.FieldMapper- Throws:
IOException
-
-