Module org.elasticsearch.server
Package org.elasticsearch.index.mapper
Class PassThroughObjectMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.ObjectMapper
org.elasticsearch.index.mapper.PassThroughObjectMapper
- All Implemented Interfaces:
Iterable<Mapper>,ToXContent,ToXContentFragment
Mapper for pass-through objects.
Pass-through objects allow creating fields inside them that can also be referenced directly in search queries.
They also include parameters that affect how nested fields get configured. For instance, if parameter "time_series_dimension"
is set, eligible subfields are marked as dimensions and keyword fields are additionally included in routing and tsid calculations.
In case different pass-through objects contain subfields with the same name (excluding the pass-through prefix), their aliases conflict.
To resolve this, the pass-through spec specifies which object takes precedence through required parameter "priority"; non-negative
integer values are accepted, with the highest priority value winning in case of conflicting aliases.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from class org.elasticsearch.index.mapper.ObjectMapper
ObjectMapper.Defaults, ObjectMapper.Dynamic, ObjectMapper.MergeResult, ObjectMapper.SubobjectsNested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.SourceKeepModeNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
FieldsFields inherited from class org.elasticsearch.index.mapper.ObjectMapper
dynamic, enabled, mappers, sourceKeepMode, SUB_OBJECTS_AUTO_FEATURE_FLAG, subobjectsFields inherited from class org.elasticsearch.index.mapper.Mapper
SYNTHETIC_SOURCE_KEEP_FEATURE, SYNTHETIC_SOURCE_KEEP_INDEX_SETTING, SYNTHETIC_SOURCE_KEEP_PARAMFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckForDuplicatePriorities(Collection<PassThroughObjectMapper> passThroughMappers) Checks the passed objects for duplicate or negative priorities.booleanmerge(Mapper mergeWith, MapperMergeContext parentBuilderContext) Return the merge ofmergeWithinto this.newBuilder(IndexVersion indexVersionCreated) intpriority()toXContent(XContentBuilder builder, ToXContent.Params params) typeName()Returns a name representing the type of this mapper.Methods inherited from class org.elasticsearch.index.mapper.ObjectMapper
createChildContext, doXContent, dynamic, findParentMapper, fullPath, getMapper, getTotalFieldsCount, isEnabled, isNested, isRoot, iterator, serializeMappers, sourceKeepMode, subobjects, validateMethods inherited from class org.elasticsearch.index.mapper.Mapper
freezeAndDeduplicateFieldType, getOffsetFieldName, internFieldName, leafName, supportStoringArrayOffsets, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
CONTENT_TYPE
- See Also:
-
PRIORITY_PARAM_NAME
- See Also:
-
-
Method Details
-
typeName
Description copied from class:MapperReturns a name representing the type of this mapper.- Overrides:
typeNamein classObjectMapper
-
containsDimensions
public boolean containsDimensions() -
priority
public int priority() -
newBuilder
- Overrides:
newBuilderin classObjectMapper- Returns:
- a Builder that will produce an empty ObjectMapper with the same configuration as this one
-
merge
Description copied from class:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified.- Overrides:
mergein classObjectMapper
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Overrides:
toXContentin classObjectMapper- Throws:
IOException
-
checkForDuplicatePriorities
public static void checkForDuplicatePriorities(Collection<PassThroughObjectMapper> passThroughMappers) Checks the passed objects for duplicate or negative priorities.- Parameters:
passThroughMappers- objects to check
-