Class ClusterSearchShardsRequest

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

public class ClusterSearchShardsRequest
extends MasterNodeReadRequest<ClusterSearchShardsRequest>
implements IndicesRequest.Replaceable
  • Constructor Details

    • ClusterSearchShardsRequest

      public ClusterSearchShardsRequest()
    • ClusterSearchShardsRequest

      public ClusterSearchShardsRequest​(java.lang.String... indices)
    • ClusterSearchShardsRequest

      public ClusterSearchShardsRequest​(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 MasterNodeReadRequest<ClusterSearchShardsRequest>
      Throws:
      java.io.IOException
    • validate

      Specified by:
      validate in class ActionRequest
    • indices

      public ClusterSearchShardsRequest indices​(java.lang.String... indices)
      Sets the indices the search will be executed on.
      Specified by:
      indices in interface IndicesRequest.Replaceable
    • indices

      public java.lang.String[] indices()
      The indices
      Specified by:
      indices in interface IndicesRequest
    • 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 ClusterSearchShardsRequest 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
    • routing

      public java.lang.String routing()
      A comma separated list of routing values to control the shards the search will be executed on.
    • routing

      public ClusterSearchShardsRequest routing​(java.lang.String routing)
      A comma separated list of routing values to control the shards the search will be executed on.
    • routing

      public ClusterSearchShardsRequest routing​(java.lang.String... routings)
      The routing values to control the shards that the search will be executed on.
    • preference

      public ClusterSearchShardsRequest preference​(java.lang.String preference)
      Sets the preference to execute the search. Defaults to randomize across shards. Can be set to _local to prefer local shards or a custom value, which guarantees that the same order will be used across different requests.
    • preference

      public java.lang.String preference()