java.lang.Object
org.elasticsearch.index.mapper.Mapper
- All Implemented Interfaces:
Iterable<Mapper>,ToXContent,ToXContentFragment
- Direct Known Subclasses:
FieldAliasMapper,FieldMapper,ObjectMapper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic interfaceNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.lucene.document.FieldTypefreezeAndDeduplicateFieldType(org.apache.lucene.document.FieldType fieldType) Freezes the givenFieldTypeinstances and tries to deduplicate it as long as the field does not return a non-empty value forFieldType.getAttributes().abstract StringfullPath()Returns the canonical name which uniquely identifies the mapper against other mappers in a type.abstract intThe total number of fields as defined in the mapping.static StringinternFieldName(String fieldName) Interns the given field name string through aStringLiteralDeduplicator.final StringleafName()Returns the name of the field.abstract Mappermerge(Mapper mergeWith, MapperMergeContext mapperMergeContext) Return the merge ofmergeWithinto this.toString()abstract StringtypeName()Returns a name representing the type of this mapper.abstract voidvalidate(MappingLookup mappers) Validate any cross-field references made by this mapperMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContentMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
SYNTHETIC_SOURCE_KEEP_PARAM
- See Also:
-
SYNTHETIC_SOURCE_KEEP_INDEX_SETTING
-
-
Constructor Details
-
Mapper
-
-
Method Details
-
leafName
Returns the name of the field. When the field has a parent object, its leaf name won't include the entire path. When subobjects are disabled, its leaf name will be the same asfullPath()in practice, because its parent is the root. -
fullPath
Returns the canonical name which uniquely identifies the mapper against other mappers in a type. -
typeName
Returns a name representing the type of this mapper. -
merge
Return the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified. -
validate
Validate any cross-field references made by this mapper- Parameters:
mappers- aMappingLookupthat can produce references to other mappers
-
toString
-
internFieldName
Interns the given field name string through aStringLiteralDeduplicator.- Parameters:
fieldName- field name to intern- Returns:
- interned field name string
-
freezeAndDeduplicateFieldType
public static org.apache.lucene.document.FieldType freezeAndDeduplicateFieldType(org.apache.lucene.document.FieldType fieldType) Freezes the givenFieldTypeinstances and tries to deduplicate it as long as the field does not return a non-empty value forFieldType.getAttributes().- Parameters:
fieldType- field type to deduplicate- Returns:
- deduplicated field type
-
getTotalFieldsCount
public abstract int getTotalFieldsCount()The total number of fields as defined in the mapping. Defines how this mapper counts towardsMapperService.INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING.
-