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>
,ToXContent
,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
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
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)
protected void
doXContent(XContentBuilder builder, ToXContent.Params params)
DateFormatter[]
dynamicDateTimeFormatters()
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)
ObjectMapper
mappingUpdate(Mapper mapper)
Build a mapping update with the provided sub mapping update.RootObjectMapper
merge(Mapper mergeWith)
Return the merge ofmergeWith
into this.boolean
numericDetection()
RootObjectMapper
updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)
Update the field type of this mapper.Methods inherited from class org.elasticsearch.index.mapper.ObjectMapper
clone, dynamic, fullPath, getMapper, getParentObjectMapper, isEnabled, iterator, name, nested, nestedTypeFilter, nestedTypePathAsString, parentObjectMapperAreNested, putMapper, toXContent, toXContent, typeName
-
Method Details
-
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
-
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
Description copied from class:Mapper
Return the merge ofmergeWith
into this. Boththis
andmergeWith
will be left unmodified.- Overrides:
merge
in classObjectMapper
-
doMerge
- Overrides:
doMerge
in classObjectMapper
-
updateFieldType
public RootObjectMapper updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)Description copied from class:Mapper
Update the field type of this mapper. This is necessary because some mapping updates can modify mappings across several types. This method must return a copy of the mapper so that the current mapper is not modified.- Overrides:
updateFieldType
in classObjectMapper
-
doXContent
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Overrides:
doXContent
in classObjectMapper
- Throws:
java.io.IOException
-