Class PutMappingRequest

java.lang.Object
org.elasticsearch.client.TimedRequest
org.elasticsearch.client.indices.PutMappingRequest
All Implemented Interfaces:
org.elasticsearch.action.IndicesRequest, Validatable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class PutMappingRequest extends TimedRequest implements org.elasticsearch.action.IndicesRequest, org.elasticsearch.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.Replaceable

    Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.elasticsearch.action.support.IndicesOptions
     

    Fields inherited from class org.elasticsearch.client.TimedRequest

    DEFAULT_ACK_TIMEOUT, DEFAULT_MASTER_NODE_TIMEOUT

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS

    Fields inherited from interface org.elasticsearch.client.Validatable

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new put mapping request against one or more indices.
  • Method Summary

    Modifier and Type
    Method
    Description
    The indices into which the mappings will be put.
    org.elasticsearch.action.support.IndicesOptions
     
    indicesOptions(org.elasticsearch.action.support.IndicesOptions indicesOptions)
     
    org.elasticsearch.common.bytes.BytesReference
    The mapping source definition.
    source(String mappingSource, org.elasticsearch.xcontent.XContentType type)
    The mapping source definition.
    source(Map<String,?> mappingSource)
    The mapping source definition.
    source(org.elasticsearch.common.bytes.BytesReference bytesReference, org.elasticsearch.xcontent.XContentType type)
    The mapping source definition.
    source(org.elasticsearch.xcontent.XContentBuilder builder)
    The mapping source definition.
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    org.elasticsearch.xcontent.XContentType
    The XContentType of the mapping source.

    Methods inherited from class org.elasticsearch.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.elasticsearch.action.IndicesRequest

    includeDataStreams

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject

    isFragment

    Methods inherited from interface org.elasticsearch.client.Validatable

    validate
  • Field Details

    • DEFAULT_INDICES_OPTIONS

      public static final org.elasticsearch.action.support.IndicesOptions DEFAULT_INDICES_OPTIONS
  • Constructor Details

    • PutMappingRequest

      public PutMappingRequest(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 String[] indices()
      The indices into which the mappings will be put.
      Specified by:
      indices in interface org.elasticsearch.action.IndicesRequest
    • indicesOptions

      public org.elasticsearch.action.support.IndicesOptions indicesOptions()
      Specified by:
      indicesOptions in interface org.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.xcontent.XContentType xContentType()
      The XContentType of the mapping source.
    • source

      public PutMappingRequest source(Map<String,?> mappingSource)
      The mapping source definition. Note that the definition should *not* be nested under a type name.
    • source

      public PutMappingRequest source(String mappingSource, org.elasticsearch.xcontent.XContentType type)
      The mapping source definition. Note that the definition should *not* be nested under a type name.
    • source

      public PutMappingRequest source(org.elasticsearch.xcontent.XContentBuilder builder)
      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 bytesReference, org.elasticsearch.xcontent.XContentType type)
      The mapping source definition. Note that the definition should *not* be nested under a type name.
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException