Package org.opensearch.index.mapper
Class TokenCountFieldMapper
java.lang.Object
org.opensearch.index.mapper.Mapper
org.opensearch.index.mapper.FieldMapper
org.opensearch.index.mapper.ParametrizedFieldMapper
org.opensearch.index.mapper.TokenCountFieldMapper
- All Implemented Interfaces:
Cloneable,Iterable<Mapper>,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.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.opensearch.index.mapper.ParametrizedFieldMapper
ParametrizedFieldMapper.Parameter<T>, ParametrizedFieldMapper.Serializer<T>, ParametrizedFieldMapper.SerializerCheck<T>, ParametrizedFieldMapper.TypeParserNested classes/interfaces inherited from class org.opensearch.index.mapper.FieldMapper
FieldMapper.CopyTo, FieldMapper.MultiFieldsNested classes/interfaces inherited from class org.opensearch.index.mapper.Mapper
Mapper.BuilderContextNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params -
Field Summary
FieldsFields inherited from class org.opensearch.index.mapper.FieldMapper
COERCE_SETTING, copyTo, fieldType, IGNORE_MALFORMED_SETTING, mappedFieldType, multiFieldsFields inherited from interface org.opensearch.core.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(ParseContext context) Methods inherited from class org.opensearch.index.mapper.ParametrizedFieldMapper
doXContentBody, merge, mergeOptionsMethods inherited from class org.opensearch.index.mapper.FieldMapper
clone, copyTo, createFieldNamesField, docValuesByDefault, doValidate, doXContentAnalyzers, fieldType, indexedByDefault, indexOptionToString, iterator, multiFields, name, parse, parsesArrayValue, storedByDefault, toXContent, typeName, validateMethods inherited from class org.opensearch.index.mapper.Mapper
hasIndexCreated, simpleNameMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.opensearch.core.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 classParametrizedFieldMapper
-