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

public class UpgradeRequest
extends BroadcastRequest<UpgradeRequest>
A request to upgrade one or more indices. In order to update all indices, pass an empty array or null for the indices.
See Also:
Requests.upgradeRequest(String...), IndicesAdminClient.upgrade(UpgradeRequest), UpgradeResponse
  • Constructor Details

    • UpgradeRequest

      public UpgradeRequest​(java.lang.String... indices)
      Constructs an optimization request over one or more indices.
      Parameters:
      indices - The indices to upgrade, no indices passed means all indices will be optimized.
    • UpgradeRequest

      public UpgradeRequest​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.IOException
  • Method Details

    • 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 BroadcastRequest<UpgradeRequest>
      Throws:
      java.io.IOException
    • upgradeOnlyAncientSegments

      public boolean upgradeOnlyAncientSegments()
      Should the upgrade only the ancient (older major version of Lucene) segments? Defaults to false.
    • upgradeOnlyAncientSegments

      public UpgradeRequest upgradeOnlyAncientSegments​(boolean upgradeOnlyAncientSegments)
    • toString

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