java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.ObjectMapper
- All Implemented Interfaces:
Iterable<Mapper>
,ToXContent
,ToXContentFragment
- Direct Known Subclasses:
NestedObjectMapper
,PassThroughObjectMapper
,RootObjectMapper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static enum
protected static final record
static enum
Enhances the previously boolean option for subobjects support with an intermediate mode `auto` that uses any objects that are present in the mappings and flattens any fields defined outside the predefined objects.static class
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.SourceKeepMode
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
protected final ObjectMapper.Dynamic
protected final Optional
<Mapper.SourceKeepMode> static final FeatureFlag
protected final Optional
<ObjectMapper.Subobjects> Fields inherited from class org.elasticsearch.index.mapper.Mapper
SYNTHETIC_SOURCE_KEEP_INDEX_SETTING, SYNTHETIC_SOURCE_KEEP_PARAM
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionprotected MapperMergeContext
createChildContext
(MapperMergeContext mapperMergeContext, String name) protected void
doXContent
(XContentBuilder builder, ToXContent.Params params) final ObjectMapper.Dynamic
dynamic()
findParentMapper
(String leafFieldPath) fullPath()
Returns the canonical name which uniquely identifies the mapper against other mappers in a type.int
The total number of fields as defined in the mapping.boolean
boolean
isNested()
protected boolean
isRoot()
iterator()
merge
(Mapper mergeWith, MapperMergeContext parentMergeContext) Return the merge ofmergeWith
into this.newBuilder
(IndexVersion indexVersionCreated) protected void
serializeMappers
(XContentBuilder builder, ToXContent.Params params) final Optional
<Mapper.SourceKeepMode> final ObjectMapper.Subobjects
toXContent
(XContentBuilder builder, ToXContent.Params params) typeName()
Returns a name representing the type of this mapper.void
validate
(MappingLookup mappers) Validate any cross-field references made by this mapperMethods inherited from class org.elasticsearch.index.mapper.Mapper
freezeAndDeduplicateFieldType, internFieldName, leafName, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
SUB_OBJECTS_AUTO_FEATURE_FLAG
-
CONTENT_TYPE
- See Also:
-
enabled
-
subobjects
-
sourceKeepMode
-
dynamic
-
mappers
-
-
Method Details
-
getTotalFieldsCount
public int getTotalFieldsCount()Description copied from class:Mapper
The total number of fields as defined in the mapping. Defines how this mapper counts towardsMapperService.INDEX_MAPPING_TOTAL_FIELDS_LIMIT_SETTING
.- Specified by:
getTotalFieldsCount
in classMapper
-
newBuilder
- Returns:
- a Builder that will produce an empty ObjectMapper with the same configuration as this one
-
fullPath
Description copied from class:Mapper
Returns the canonical name which uniquely identifies the mapper against other mappers in a type. -
typeName
Description copied from class:Mapper
Returns a name representing the type of this mapper. -
isEnabled
public boolean isEnabled() -
isNested
public boolean isNested() -
getMapper
-
iterator
-
dynamic
-
subobjects
-
sourceKeepMode
-
validate
Description copied from class:Mapper
Validate any cross-field references made by this mapper- Specified by:
validate
in classMapper
- Parameters:
mappers
- aMappingLookup
that can produce references to other mappers
-
createChildContext
-
merge
Description copied from class:Mapper
Return the merge ofmergeWith
into this. Boththis
andmergeWith
will be left unmodified. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Throws:
IOException
-
serializeMappers
protected void serializeMappers(XContentBuilder builder, ToXContent.Params params) throws IOException - Throws:
IOException
-
doXContent
- Throws:
IOException
-
findParentMapper
-
isRoot
protected boolean isRoot()
-