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.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
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
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
-
Methods inherited from class org.elasticsearch.index.mapper.Mapper
simpleName
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Method Detail
-
mappingUpdate
public ObjectMapper mappingUpdate(Mapper mapper)
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
public DateFormatter[] 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
public RootObjectMapper merge(Mapper mergeWith)
Description copied from class:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified.- Overrides:
mergein classObjectMapper
-
doMerge
protected void doMerge(ObjectMapper mergeWith)
- 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
-
-