Package org.opensearch.client.indices
Class PutMappingRequest
- java.lang.Object
-
- org.opensearch.client.TimedRequest
-
- org.opensearch.client.indices.PutMappingRequest
-
- All Implemented Interfaces:
org.opensearch.action.IndicesRequest,Validatable,org.opensearch.common.xcontent.ToXContent,org.opensearch.common.xcontent.ToXContentObject
public class PutMappingRequest extends TimedRequest implements org.opensearch.action.IndicesRequest, org.opensearch.common.xcontent.ToXContentObject
Put a mapping definition into one or more indices. If an index already contains mappings, the new mappings will be merged with the existing one. If there are elements that cannot be merged, the request will be rejected.
-
-
Field Summary
-
Fields inherited from class org.opensearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT
-
Fields inherited from interface org.opensearch.client.Validatable
EMPTY
-
-
Constructor Summary
Constructors Constructor Description PutMappingRequest(java.lang.String... indices)Constructs a new put mapping request against one or more indices.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]indices()The indices into which the mappings will be put.org.opensearch.action.support.IndicesOptionsindicesOptions()PutMappingRequestindicesOptions(org.opensearch.action.support.IndicesOptions indicesOptions)org.opensearch.common.bytes.BytesReferencesource()The mapping source definition.PutMappingRequestsource(java.lang.String mappingSource, org.opensearch.common.xcontent.XContentType xContentType)The mapping source definition.PutMappingRequestsource(java.util.Map<java.lang.String,?> mappingSource)The mapping source definition.PutMappingRequestsource(org.opensearch.common.bytes.BytesReference source, org.opensearch.common.xcontent.XContentType xContentType)The mapping source definition.PutMappingRequestsource(org.opensearch.common.xcontent.XContentBuilder builder)The mapping source definition.org.opensearch.common.xcontent.XContentBuildertoXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params)org.opensearch.common.xcontent.XContentTypexContentType()TheXContentTypeof the mapping source.-
Methods inherited from class org.opensearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opensearch.client.Validatable
validate
-
-
-
-
Method Detail
-
indices
public java.lang.String[] indices()
The indices into which the mappings will be put.- Specified by:
indicesin interfaceorg.opensearch.action.IndicesRequest
-
indicesOptions
public org.opensearch.action.support.IndicesOptions indicesOptions()
- Specified by:
indicesOptionsin interfaceorg.opensearch.action.IndicesRequest
-
indicesOptions
public PutMappingRequest indicesOptions(org.opensearch.action.support.IndicesOptions indicesOptions)
-
source
public org.opensearch.common.bytes.BytesReference source()
The mapping source definition.
-
xContentType
public org.opensearch.common.xcontent.XContentType xContentType()
TheXContentTypeof the mapping source.
-
source
public PutMappingRequest source(java.util.Map<java.lang.String,?> mappingSource)
The mapping source definition. Note that the definition should *not* be nested under a type name.
-
source
public PutMappingRequest source(java.lang.String mappingSource, org.opensearch.common.xcontent.XContentType xContentType)
The mapping source definition. Note that the definition should *not* be nested under a type name.
-
source
public PutMappingRequest source(org.opensearch.common.xcontent.XContentBuilder builder)
The mapping source definition. Note that the definition should *not* be nested under a type name.
-
source
public PutMappingRequest source(org.opensearch.common.bytes.BytesReference source, org.opensearch.common.xcontent.XContentType xContentType)
The mapping source definition. Note that the definition should *not* be nested under a type name.
-
toXContent
public org.opensearch.common.xcontent.XContentBuilder toXContent(org.opensearch.common.xcontent.XContentBuilder builder, org.opensearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.opensearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-
-