Class UpdateSettingsRequest

All Implemented Interfaces:
IndicesRequest, IndicesRequest.Replaceable, AckedRequest, Writeable, org.elasticsearch.common.util.concurrent.RefCounted, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, TaskAwareRequest

public class UpdateSettingsRequest
extends AcknowledgedRequest<UpdateSettingsRequest>
implements IndicesRequest.Replaceable, org.elasticsearch.common.xcontent.ToXContentObject
Request for an update index settings action
  • Constructor Details

    • UpdateSettingsRequest

      public UpdateSettingsRequest​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
    • UpdateSettingsRequest

      public UpdateSettingsRequest()
    • UpdateSettingsRequest

      public UpdateSettingsRequest​(java.lang.String... indices)
      Constructs a new request to update settings for one or more indices
    • UpdateSettingsRequest

      public UpdateSettingsRequest​(Settings settings, java.lang.String... indices)
      Constructs a new request to update settings for one or more indices
  • Method Details

    • validate

      Specified by:
      validate in class ActionRequest
    • indices

      public java.lang.String[] indices()
      Description copied from interface: IndicesRequest
      Returns the array of indices that the action relates to
      Specified by:
      indices in interface IndicesRequest
    • settings

      public Settings settings()
    • indices

      public UpdateSettingsRequest indices​(java.lang.String... indices)
      Sets the indices to apply to settings update to
      Specified by:
      indices in interface IndicesRequest.Replaceable
    • indicesOptions

      public IndicesOptions indicesOptions()
      Description copied from interface: IndicesRequest
      Returns the indices options used to resolve indices. They tell for instance whether a single index is accepted, whether an empty array will be converted to _all, and how wildcards will be expanded if needed.
      Specified by:
      indicesOptions in interface IndicesRequest
    • indicesOptions

      public UpdateSettingsRequest indicesOptions​(IndicesOptions indicesOptions)
    • includeDataStreams

      public boolean includeDataStreams()
      Description copied from interface: IndicesRequest
      Determines whether the request should be applied to data streams. When false, none of the names or wildcard expressions in IndicesRequest.indices() should be applied to or expanded to any data streams. All layers involved in the request's fulfillment including security, name resolution, etc., should respect this flag.
      Specified by:
      includeDataStreams in interface IndicesRequest
    • settings

      public UpdateSettingsRequest settings​(Settings settings)
      Sets the settings to be updated
    • settings

      public UpdateSettingsRequest settings​(Settings.Builder settings)
      Sets the settings to be updated
    • settings

      public UpdateSettingsRequest settings​(java.lang.String source, org.elasticsearch.common.xcontent.XContentType xContentType)
      Sets the settings to be updated (either json or yaml format)
    • isPreserveExisting

      public boolean isPreserveExisting()
      Returns true iff the settings update should only add but not update settings. If the setting already exists it should not be overwritten by this update. The default is false
    • setPreserveExisting

      public UpdateSettingsRequest setPreserveExisting​(boolean preserveExisting)
      Iff set to true this settings update will only add settings not already set on an index. Existing settings remain unchanged.
    • settings

      public UpdateSettingsRequest settings​(java.util.Map<java.lang.String,​?> source)
      Sets the settings to be updated (either json or yaml format)
    • origin

      public java.lang.String origin()
    • origin

      public UpdateSettingsRequest origin​(java.lang.String origin)
    • writeTo

      public void writeTo​(StreamOutput out) throws java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class AcknowledgedRequest<UpdateSettingsRequest>
      Throws:
      java.io.IOException
    • 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:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • fromXContent

      public UpdateSettingsRequest fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object