Package org.elasticsearch.index.mapper
Class RootObjectMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.ObjectMapper
org.elasticsearch.index.mapper.RootObjectMapper
- All Implemented Interfaces:
java.lang.Cloneable
,java.lang.Iterable<Mapper>
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
public class RootObjectMapper extends ObjectMapper
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RootObjectMapper.Builder
static class
RootObjectMapper.Defaults
static class
RootObjectMapper.TypeParser
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.ObjectMapper
ObjectMapper.Dynamic, ObjectMapper.Nested
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.BuilderContext
-
Field Summary
Fields inherited from class org.elasticsearch.index.mapper.ObjectMapper
CONTENT_TYPE, NESTED_CONTENT_TYPE
-
Method Summary
Modifier and Type Method Description boolean
dateDetection()
protected void
doMerge(ObjectMapper mergeWith, MapperService.MergeReason reason)
protected void
doXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
DateFormatter[]
dynamicDateTimeFormatters()
DynamicTemplate[]
dynamicTemplates()
DynamicTemplate
findTemplate(ContentPath path, java.lang.String name, DynamicTemplate.XContentFieldType matchType)
Mapper.Builder
findTemplateBuilder(ParseContext context, java.lang.String name, java.lang.String dynamicType, DynamicTemplate.XContentFieldType matchType)
Find a template.Mapper.Builder
findTemplateBuilder(ParseContext context, java.lang.String name, DynamicTemplate.XContentFieldType matchType)
void
fixRedundantIncludes()
Removes redundant root includes inObjectMapper.Nested
trees to avoid duplicate fields on the root mapper whenisIncludeInRoot
istrue
for a node that is itself included into a parent node, for which eitherisIncludeInRoot
istrue
or which is transitively included in root by a chain of nodes withisIncludeInParent
returningtrue
.ObjectMapper
mappingUpdate(Mapper mapper)
Build a mapping update with the provided sub mapping update.RootObjectMapper
merge(Mapper mergeWith, MapperService.MergeReason reason)
boolean
numericDetection()
Methods inherited from class org.elasticsearch.index.mapper.ObjectMapper
clone, dynamic, fullPath, getMapper, getParentObjectMapper, isEnabled, iterator, merge, name, nested, nestedTypeFilter, nestedTypePathAsString, parentObjectMapperAreNested, putMapper, toXContent, toXContent, typeName
-
Method Details
-
fixRedundantIncludes
public void fixRedundantIncludes()Removes redundant root includes inObjectMapper.Nested
trees to avoid duplicate fields on the root mapper whenisIncludeInRoot
istrue
for a node that is itself included into a parent node, for which eitherisIncludeInRoot
istrue
or which is transitively included in root by a chain of nodes withisIncludeInParent
returningtrue
. -
mappingUpdate
Description copied from class:ObjectMapper
Build a mapping update with the provided sub mapping update.- Overrides:
mappingUpdate
in classObjectMapper
-
dateDetection
public boolean dateDetection() -
numericDetection
public boolean numericDetection() -
dynamicDateTimeFormatters
-
dynamicTemplates
-
findTemplateBuilder
public Mapper.Builder findTemplateBuilder(ParseContext context, java.lang.String name, DynamicTemplate.XContentFieldType matchType) -
findTemplateBuilder
public Mapper.Builder findTemplateBuilder(ParseContext context, java.lang.String name, java.lang.String dynamicType, DynamicTemplate.XContentFieldType matchType)Find a template. Returnsnull
if no template could be found.- Parameters:
name
- the field namedynamicType
- the field type to give the field if the template does not define onematchType
- the type of the field in the json document or null if unknown- Returns:
- a mapper builder, or null if there is no template for such a field
-
findTemplate
public DynamicTemplate findTemplate(ContentPath path, java.lang.String name, DynamicTemplate.XContentFieldType matchType) -
merge
- Overrides:
merge
in classObjectMapper
-
doMerge
- Overrides:
doMerge
in classObjectMapper
-
doXContent
protected void doXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Overrides:
doXContent
in classObjectMapper
- Throws:
java.io.IOException
-