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 classRootObjectMapper.Builderstatic classRootObjectMapper.Defaultsstatic classRootObjectMapper.TypeParserNested classes/interfaces inherited from class org.elasticsearch.index.mapper.ObjectMapper
ObjectMapper.Dynamic, ObjectMapper.NestedNested classes/interfaces inherited from class org.elasticsearch.index.mapper.Mapper
Mapper.BuilderContextNested 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 booleandateDetection()protected voiddoMerge(ObjectMapper mergeWith)protected voiddoXContent(XContentBuilder builder, ToXContent.Params params)DateFormatter[]dynamicDateTimeFormatters()DynamicTemplatefindTemplate(ContentPath path, java.lang.String name, DynamicTemplate.XContentFieldType matchType)Mapper.BuilderfindTemplateBuilder(ParseContext context, java.lang.String name, java.lang.String dynamicType, DynamicTemplate.XContentFieldType matchType)Find a template.Mapper.BuilderfindTemplateBuilder(ParseContext context, java.lang.String name, DynamicTemplate.XContentFieldType matchType)ObjectMappermappingUpdate(Mapper mapper)Build a mapping update with the provided sub mapping update.RootObjectMappermerge(Mapper mergeWith)Return the merge ofmergeWithinto this.booleannumericDetection()RootObjectMapperupdateFieldType(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:ObjectMapperBuild a mapping update with the provided sub mapping update.- Overrides:
mappingUpdatein 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. Returnsnullif 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:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified.- Overrides:
mergein classObjectMapper
-
doMerge
- Overrides:
doMergein classObjectMapper
-
updateFieldType
public RootObjectMapper updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)Description copied from class:MapperUpdate 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:
updateFieldTypein classObjectMapper
-
doXContent
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Overrides:
doXContentin classObjectMapper- Throws:
java.io.IOException
-