Package org.elasticsearch.index.mapper
Class TokenCountFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.FieldMapper
org.elasticsearch.index.mapper.TokenCountFieldMapper
- All Implemented Interfaces:
Cloneable,Iterable<Mapper>,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
A
FieldMapper that takes a string and writes a count of the tokens in that string
to the index. In most ways the mapper acts just like an NumberFieldMapper.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.elasticsearch.index.mapper.FieldMapper
FieldMapper.Conflicts, FieldMapper.CopyTo, FieldMapper.MergeValidator<T extends Object>, FieldMapper.MultiFields, FieldMapper.Parameter<T extends Object>, FieldMapper.Serializer<T extends Object>, FieldMapper.SerializerCheck<T extends Object>, FieldMapper.TypeParserNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params -
Field Summary
FieldsFields inherited from class org.elasticsearch.index.mapper.FieldMapper
COERCE_SETTING, copyTo, hasScript, IGNORE_MALFORMED_SETTING, indexAnalyzers, mappedFieldType, multiFields, onScriptErrorFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTokenCountFieldMapper(String simpleName, MappedFieldType defaultFieldType, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo, TokenCountFieldMapper.Builder builder) -
Method Summary
Modifier and TypeMethodDescriptionanalyzer()Name of analyzer.protected StringbooleanIndicates if position increments are counted.protected voidparseCreateField(DocumentParserContext context) Methods inherited from class org.elasticsearch.index.mapper.FieldMapper
checkIncomingMergeType, copyTo, doValidate, doXContentBody, executeScript, fieldType, hasScript, indexAnalyzers, indexScriptValues, iterator, merge, multiFields, name, notInMultiFields, parse, parsesArrayValue, toXContent, typeName, validateMethods inherited from class org.elasticsearch.index.mapper.Mapper
simpleNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
CONTENT_TYPE
- See Also:
-
PARSER
-
-
Constructor Details
-
TokenCountFieldMapper
protected TokenCountFieldMapper(String simpleName, MappedFieldType defaultFieldType, FieldMapper.MultiFields multiFields, FieldMapper.CopyTo copyTo, TokenCountFieldMapper.Builder builder)
-
-
Method Details
-
parseCreateField
- Specified by:
parseCreateFieldin classFieldMapper- Throws:
IOException
-
analyzer
Name of analyzer.- Returns:
- name of analyzer
-
enablePositionIncrements
public boolean enablePositionIncrements()Indicates if position increments are counted.- Returns:
trueif position increments are counted
-
contentType
- Specified by:
contentTypein classFieldMapper
-
getMergeBuilder
- Specified by:
getMergeBuilderin classFieldMapper
-