Package org.elasticsearch.index.mapper
Class Mapping
- java.lang.Object
-
- org.elasticsearch.index.mapper.Mapping
-
- All Implemented Interfaces:
ToXContent,ToXContentFragment
public final class Mapping extends Object implements ToXContentFragment
Wrapper around everything that defines a mapping, without references to utility classes like MapperService, ...
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description Mapping(Version indexCreated, RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, Map<String,Object> meta)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MappingmappingUpdate(Mapper rootObjectMapper)Generate a mapping update for the given root object mapper.Mappingmerge(Mapping mergeWith)<T extends MetadataFieldMapper>
TmetadataMapper(Class<T> clazz)Get the root mapper with the given class.RootObjectMapperroot()Return the root object mapper.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)MappingupdateFieldType(Map<String,MappedFieldType> fullNameToFieldType)Recursively update sub field types.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Constructor Detail
-
Mapping
public Mapping(Version indexCreated, RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, Map<String,Object> meta)
-
-
Method Detail
-
root
public RootObjectMapper root()
Return the root object mapper.
-
mappingUpdate
public Mapping mappingUpdate(Mapper rootObjectMapper)
Generate a mapping update for the given root object mapper.
-
metadataMapper
public <T extends MetadataFieldMapper> T metadataMapper(Class<T> clazz)
Get the root mapper with the given class.
-
merge
public Mapping merge(Mapping mergeWith)
- See Also:
DocumentMapper.merge(Mapping)
-
updateFieldType
public Mapping updateFieldType(Map<String,MappedFieldType> fullNameToFieldType)
Recursively update sub field types.
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
-