Package org.elasticsearch.client.indices
Class PutMappingRequest
java.lang.Object
org.elasticsearch.client.TimedRequest
org.elasticsearch.client.indices.PutMappingRequest
- All Implemented Interfaces:
org.elasticsearch.action.IndicesRequest,Validatable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class PutMappingRequest extends TimedRequest implements org.elasticsearch.action.IndicesRequest, org.elasticsearch.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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
org.elasticsearch.action.IndicesRequest.ReplaceableNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params -
Field Summary
Fields inherited from class org.elasticsearch.client.TimedRequest
DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUTFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMSFields inherited from interface org.elasticsearch.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
Modifier and Type Method Description java.lang.String[]indices()The indices into which the mappings will be put.org.elasticsearch.action.support.IndicesOptionsindicesOptions()PutMappingRequestindicesOptions(org.elasticsearch.action.support.IndicesOptions indicesOptions)org.elasticsearch.common.bytes.BytesReferencesource()The mapping source definition.PutMappingRequestsource(java.lang.String mappingSource, org.elasticsearch.common.xcontent.XContentType xContentType)The mapping source definition.PutMappingRequestsource(java.util.Map<java.lang.String,?> mappingSource)The mapping source definition.PutMappingRequestsource(org.elasticsearch.common.bytes.BytesReference source, org.elasticsearch.common.xcontent.XContentType xContentType)The mapping source definition.PutMappingRequestsource(org.elasticsearch.common.xcontent.XContentBuilder builder)The mapping source definition.org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)org.elasticsearch.common.xcontent.XContentTypexContentType()TheXContentTypeof the mapping source.Methods inherited from class org.elasticsearch.client.TimedRequest
masterNodeTimeout, setMasterTimeout, setTimeout, timeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.action.IndicesRequest
includeDataStreamsMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragmentMethods inherited from interface org.elasticsearch.client.Validatable
validate
-
Constructor Details
-
PutMappingRequest
public PutMappingRequest(java.lang.String... indices)Constructs a new put mapping request against one or more indices. If no indices are provided then it will be executed against all indices.
-
-
Method Details
-
indices
public java.lang.String[] indices()The indices into which the mappings will be put.- Specified by:
indicesin interfaceorg.elasticsearch.action.IndicesRequest
-
indicesOptions
public org.elasticsearch.action.support.IndicesOptions indicesOptions()- Specified by:
indicesOptionsin interfaceorg.elasticsearch.action.IndicesRequest
-
indicesOptions
public PutMappingRequest indicesOptions(org.elasticsearch.action.support.IndicesOptions indicesOptions) -
source
public org.elasticsearch.common.bytes.BytesReference source()The mapping source definition. -
xContentType
public org.elasticsearch.common.xcontent.XContentType xContentType()TheXContentTypeof the mapping source. -
source
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.elasticsearch.common.xcontent.XContentType xContentType)The mapping source definition. Note that the definition should *not* be nested under a type name. -
source
The mapping source definition. Note that the definition should *not* be nested under a type name. -
source
public PutMappingRequest source(org.elasticsearch.common.bytes.BytesReference source, org.elasticsearch.common.xcontent.XContentType xContentType)The mapping source definition. Note that the definition should *not* be nested under a type name. -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
java.io.IOException
-