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 class
static enum
static interface
Nested 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.FieldType
freezeAndDeduplicateFieldType
(org.apache.lucene.document.FieldType fieldType) Freezes the givenFieldType
instances and tries to deduplicate it as long as the field does not return a non-empty value forFieldType.getAttributes()
.abstract String
fullPath()
Returns the canonical name which uniquely identifies the mapper against other mappers in a type.abstract int
The total number of fields as defined in the mapping.static String
internFieldName
(String fieldName) Interns the given field name string through aStringLiteralDeduplicator
.final String
leafName()
Returns the name of the field.abstract Mapper
merge
(Mapper mergeWith, MapperMergeContext mapperMergeContext) Return the merge ofmergeWith
into this.toString()
abstract String
typeName()
Returns a name representing the type of this mapper.abstract void
validate
(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, wait
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.elasticsearch.xcontent.ToXContent
toXContent
Methods 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 ofmergeWith
into this. Boththis
andmergeWith
will be left unmodified. -
validate
Validate any cross-field references made by this mapper- Parameters:
mappers
- aMappingLookup
that 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 givenFieldType
instances 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
.
-