Package org.elasticsearch.index.mapper
Class ObjectMapper
java.lang.Object
org.elasticsearch.index.mapper.Mapper
org.elasticsearch.index.mapper.ObjectMapper
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Iterable<Mapper>,ToXContent,ToXContentFragment
- Direct Known Subclasses:
RootObjectMapper
public class ObjectMapper extends Mapper implements java.lang.Cloneable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classObjectMapper.Builder<T extends ObjectMapper.Builder,Y extends ObjectMapper>static classObjectMapper.Defaultsstatic classObjectMapper.Dynamicstatic classObjectMapper.Nestedstatic classObjectMapper.TypeParserNested 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 Modifier and Type Field Description static java.lang.StringCONTENT_TYPEstatic java.lang.StringNESTED_CONTENT_TYPE -
Method Summary
Modifier and Type Method Description protected ObjectMapperclone()protected voiddoMerge(ObjectMapper mergeWith)protected voiddoXContent(XContentBuilder builder, ToXContent.Params params)ObjectMapper.Dynamicdynamic()java.lang.StringfullPath()MappergetMapper(java.lang.String field)ObjectMappergetParentObjectMapper(MapperService mapperService)Returns the parentObjectMapperinstance of the specified object mapper ornullif there isn't any.booleanisEnabled()java.util.Iterator<Mapper>iterator()ObjectMappermappingUpdate(Mapper mapper)Build a mapping update with the provided sub mapping update.ObjectMappermerge(Mapper mergeWith)Return the merge ofmergeWithinto this.java.lang.Stringname()Returns the canonical name which uniquely identifies the mapper against other mappers in a type.ObjectMapper.Nestednested()org.apache.lucene.search.QuerynestedTypeFilter()java.lang.StringnestedTypePathAsString()booleanparentObjectMapperAreNested(MapperService mapperService)Returns whether all parent objects fields are nested too.protected voidputMapper(Mapper mapper)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)voidtoXContent(XContentBuilder builder, ToXContent.Params params, ToXContent custom)java.lang.StringtypeName()Returns a name representing the type of this mapper.ObjectMapperupdateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)Update the field type of this mapper.
-
Field Details
-
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE- See Also:
- Constant Field Values
-
NESTED_CONTENT_TYPE
public static final java.lang.String NESTED_CONTENT_TYPE- See Also:
- Constant Field Values
-
-
Method Details
-
clone
- Overrides:
clonein classjava.lang.Object
-
mappingUpdate
Build a mapping update with the provided sub mapping update. -
name
public java.lang.String name()Description copied from class:MapperReturns the canonical name which uniquely identifies the mapper against other mappers in a type. -
typeName
public java.lang.String typeName()Description copied from class:MapperReturns a name representing the type of this mapper. -
isEnabled
public boolean isEnabled() -
getMapper
-
nested
-
nestedTypeFilter
public org.apache.lucene.search.Query nestedTypeFilter() -
putMapper
-
iterator
- Specified by:
iteratorin interfacejava.lang.Iterable<Mapper>
-
fullPath
public java.lang.String fullPath() -
nestedTypePathAsString
public java.lang.String nestedTypePathAsString() -
dynamic
-
getParentObjectMapper
Returns the parentObjectMapperinstance of the specified object mapper ornullif there isn't any. -
parentObjectMapperAreNested
Returns whether all parent objects fields are nested too. -
merge
Description copied from class:MapperReturn the merge ofmergeWithinto this. BoththisandmergeWithwill be left unmodified. -
doMerge
-
updateFieldType
public ObjectMapper 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.- Specified by:
updateFieldTypein classMapper
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
toXContent
public void toXContent(XContentBuilder builder, ToXContent.Params params, ToXContent custom) throws java.io.IOException- Throws:
java.io.IOException
-
doXContent
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Throws:
java.io.IOException
-