java.lang.Object
org.elasticsearch.index.mapper.MapperBuilderContext
Holds context for building Mapper objects from their Builders
-
Method Summary
Modifier and TypeMethodDescriptionbuildFullName
(String name) Builds the full name of the field, taking into account parent objectscreateChildContext
(String name, boolean parentObjectContainsDimensions, ObjectMapper.Dynamic dynamic) Creates a new MapperBuilderContext that is a child of this contextcreateChildContext
(String name, ObjectMapper.Dynamic dynamic) Creates a new MapperBuilderContext that is a child of this contextprotected ObjectMapper.Dynamic
getDynamic
(ObjectMapper.Dynamic dynamic) The merge reason to use when merging mappers while building the mapper.boolean
Are these mappings being built for a data stream index?boolean
Returns true if this context is included in a nested context, either directly or any of its ancestors.boolean
Is the_source
field being reconstructed on the fly?boolean
Are these field mappings being built dimensions?static MapperBuilderContext
root
(boolean isSourceSynthetic, boolean isDataStream) The root context, to be used when building a tree of mappersstatic MapperBuilderContext
root
(boolean isSourceSynthetic, boolean isDataStream, MapperService.MergeReason mergeReason)
-
Method Details
-
root
The root context, to be used when building a tree of mappers -
root
public static MapperBuilderContext root(boolean isSourceSynthetic, boolean isDataStream, MapperService.MergeReason mergeReason) -
createChildContext
Creates a new MapperBuilderContext that is a child of this context- Parameters:
name
- the name of the child contextdynamic
- strategy for handling dynamic mappings in this context- Returns:
- a new MapperBuilderContext with this context as its parent
-
createChildContext
public MapperBuilderContext createChildContext(String name, boolean parentObjectContainsDimensions, @Nullable ObjectMapper.Dynamic dynamic) Creates a new MapperBuilderContext that is a child of this context- Parameters:
name
- the name of the child contextdynamic
- strategy for handling dynamic mappings in this contextparentObjectContainsDimensions
- whether the parent object contains dimensions- Returns:
- a new MapperBuilderContext with this context as its parent
-
getDynamic
-
buildFullName
Builds the full name of the field, taking into account parent objects -
isSourceSynthetic
public boolean isSourceSynthetic()Is the_source
field being reconstructed on the fly? -
isDataStream
public boolean isDataStream()Are these mappings being built for a data stream index? -
parentObjectContainsDimensions
public boolean parentObjectContainsDimensions()Are these field mappings being built dimensions? -
getDynamic
-
getMergeReason
The merge reason to use when merging mappers while building the mapper. See alsoObjectMapper.Builder.buildMappers(MapperBuilderContext)
. -
isInNestedContext
public boolean isInNestedContext()Returns true if this context is included in a nested context, either directly or any of its ancestors.
-