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.DynamicgetDynamic(ObjectMapper.Dynamic dynamic) The merge reason to use when merging mappers while building the mapper.booleanAre these mappings being built for a data stream index?booleanReturns true if this context is included in a nested context, either directly or any of its ancestors.booleanIs the_sourcefield being reconstructed on the fly?booleanAre these field mappings being built dimensions?static MapperBuilderContextroot(boolean isSourceSynthetic, boolean isDataStream) The root context, to be used when building a tree of mappersstatic MapperBuilderContextroot(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 contextparentObjectContainsDimensions- whether the parent object contains dimensionsdynamic- strategy for handling dynamic mappings in this context- 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_sourcefield 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.
-