public final class Mapping extends java.lang.Object implements ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
EMPTY_PARAMS
Constructor and Description |
---|
Mapping(Version indexCreated,
RootObjectMapper rootObjectMapper,
MetadataFieldMapper[] metadataMappers,
java.util.Map<java.lang.String,java.lang.Object> meta) |
Modifier and Type | Method and Description |
---|---|
Mapping |
mappingUpdate(Mapper rootObjectMapper)
Generate a mapping update for the given root object mapper.
|
Mapping |
merge(Mapping mergeWith,
boolean updateAllTypes) |
<T extends MetadataFieldMapper> |
metadataMapper(java.lang.Class<T> clazz)
Get the root mapper with the given class.
|
RootObjectMapper |
root()
Return the root object mapper.
|
java.lang.String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Mapping |
updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)
Recursively update sub field types.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFragment
public Mapping(Version indexCreated, RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, java.util.Map<java.lang.String,java.lang.Object> meta)
public RootObjectMapper root()
public Mapping mappingUpdate(Mapper rootObjectMapper)
public <T extends MetadataFieldMapper> T metadataMapper(java.lang.Class<T> clazz)
public Mapping merge(Mapping mergeWith, boolean updateAllTypes)
DocumentMapper.merge(Mapping, boolean)
public Mapping updateFieldType(java.util.Map<java.lang.String,MappedFieldType> fullNameToFieldType)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object