Package org.opensearch.index.mapper
Class Mapping
java.lang.Object
org.opensearch.index.mapper.Mapping
- All Implemented Interfaces:
org.opensearch.core.xcontent.ToXContent
,org.opensearch.core.xcontent.ToXContentFragment
@PublicApi(since="1.0.0")
public final class Mapping
extends Object
implements org.opensearch.core.xcontent.ToXContentFragment
Wrapper around everything that defines a mapping, without references to
utility classes like MapperService, ...
- Opensearch.api:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionMapping
(org.opensearch.Version indexCreated, RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, Map<String, Object> meta) -
Method Summary
Modifier and TypeMethodDescriptiongetMetadataMapper
(String mapperName) mappingUpdate
(Mapper rootObjectMapper) Generate a mapping update for the given root object mapper.merge
(Mapping mergeWith, MapperService.MergeReason reason) Merges a new mapping into the existing one.<T extends MetadataFieldMapper>
TmetadataMapper
(Class<T> clazz) Get the root mapper with the given class.root()
Return the root object mapper.toString()
org.opensearch.core.xcontent.XContentBuilder
toXContent
(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) void
validate
(MappingLookup mappers) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opensearch.core.xcontent.ToXContentFragment
isFragment
-
Constructor Details
-
Mapping
public Mapping(org.opensearch.Version indexCreated, RootObjectMapper rootObjectMapper, MetadataFieldMapper[] metadataMappers, Map<String, Object> meta)
-
-
Method Details
-
root
Return the root object mapper. -
validate
-
mappingUpdate
Generate a mapping update for the given root object mapper. -
metadataMapper
Get the root mapper with the given class. -
merge
Merges a new mapping into the existing one.- Parameters:
mergeWith
- the new mapping to merge into this one.reason
- the reason this merge was initiated.- Returns:
- the resulting merged mapping.
-
getMetadataMapper
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.opensearch.core.xcontent.ToXContent
- Throws:
IOException
-
toString
-