public final class Mapping extends Object implements ToXContent
Modifier and Type | Class and Description |
---|---|
static interface |
Mapping.SourceTransform
Transformations to be applied to the source before indexing and/or after loading.
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static Set<String> |
LEGACY_INCLUDE_IN_OBJECT |
EMPTY_PARAMS
Constructor and Description |
---|
Mapping(Version indexCreated,
RootObjectMapper rootObjectMapper,
MetadataFieldMapper[] metadataMappers,
Mapping.SourceTransform[] sourceTransforms,
com.google.common.collect.ImmutableMap<String,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(Class<T> clazz)
Get the root mapper with the given class.
|
RootObjectMapper |
root()
Return the root object mapper.
|
BytesReference |
toBytes()
Serialize to a
BytesReference . |
String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
Mapping |
updateFieldType(Map<String,MappedFieldType> fullNameToFieldType)
Recursively update sub field types.
|
public Mapping(Version indexCreated, RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, Mapping.SourceTransform[] sourceTransforms, com.google.common.collect.ImmutableMap<String,Object> meta)
public RootObjectMapper root()
public Mapping mappingUpdate(Mapper rootObjectMapper)
public <T extends MetadataFieldMapper> T metadataMapper(Class<T> clazz)
public Mapping updateFieldType(Map<String,MappedFieldType> fullNameToFieldType)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public BytesReference toBytes()
BytesReference
.Copyright © 2009–2017. All rights reserved.