Class IndicesStatsRequest

java.lang.Object
org.opensearch.core.transport.TransportMessage
All Implemented Interfaces:
IndicesRequest, IndicesRequest.Replaceable, org.opensearch.core.common.io.stream.Writeable, TaskAwareRequest

@PublicApi(since="1.0.0") public class IndicesStatsRequest extends BroadcastRequest<IndicesStatsRequest>
A request to get indices level stats. Allow to enable different stats to be returned.

By default, all statistics are enabled.

All the stats to be returned can be cleared using clear(), at which point, specific stats can be enabled.

Opensearch.api:
  • Constructor Details

    • IndicesStatsRequest

      public IndicesStatsRequest()
    • IndicesStatsRequest

      public IndicesStatsRequest(org.opensearch.core.common.io.stream.StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • all

      public IndicesStatsRequest all()
      Sets all flags to return all stats.
    • clear

      public IndicesStatsRequest clear()
      Clears all stats.
    • flags

      public CommonStatsFlags flags()
      Returns the underlying stats flags.
    • flags

      public IndicesStatsRequest flags(CommonStatsFlags flags)
      Sets the underlying stats flags.
    • groups

      public IndicesStatsRequest groups(String... groups)
      Sets specific search group stats to retrieve the stats for. Mainly affects search when enabled.
    • createTask

      public Task createTask(long id, String type, String action, org.opensearch.core.tasks.TaskId parentTaskId, Map<String,String> headers)
      Description copied from interface: TaskAwareRequest
      Returns the task object that should be used to keep track of the processing of the request.
    • groups

      public String[] groups()
    • docs

      public IndicesStatsRequest docs(boolean docs)
    • docs

      public boolean docs()
    • store

      public IndicesStatsRequest store(boolean store)
    • store

      public boolean store()
    • indexing

      public IndicesStatsRequest indexing(boolean indexing)
    • indexing

      public boolean indexing()
    • get

      public IndicesStatsRequest get(boolean get)
    • get

      public boolean get()
    • search

      public IndicesStatsRequest search(boolean search)
    • search

      public boolean search()
    • merge

      public IndicesStatsRequest merge(boolean merge)
    • merge

      public boolean merge()
    • refresh

      public IndicesStatsRequest refresh(boolean refresh)
    • refresh

      public boolean refresh()
    • flush

      public IndicesStatsRequest flush(boolean flush)
    • flush

      public boolean flush()
    • warmer

      public IndicesStatsRequest warmer(boolean warmer)
    • warmer

      public boolean warmer()
    • queryCache

      public IndicesStatsRequest queryCache(boolean queryCache)
    • queryCache

      public boolean queryCache()
    • fieldData

      public IndicesStatsRequest fieldData(boolean fieldData)
    • fieldData

      public boolean fieldData()
    • segments

      public IndicesStatsRequest segments(boolean segments)
    • segments

      public boolean segments()
    • fieldDataFields

      public IndicesStatsRequest fieldDataFields(String... fieldDataFields)
    • fieldDataFields

      public String[] fieldDataFields()
    • completion

      public IndicesStatsRequest completion(boolean completion)
    • completion

      public boolean completion()
    • completionFields

      public IndicesStatsRequest completionFields(String... completionDataFields)
    • completionFields

      public String[] completionFields()
    • translog

      public IndicesStatsRequest translog(boolean translog)
    • translog

      public boolean translog()
    • requestCache

      public IndicesStatsRequest requestCache(boolean requestCache)
    • requestCache

      public boolean requestCache()
    • recovery

      public IndicesStatsRequest recovery(boolean recovery)
    • recovery

      public boolean recovery()
    • includeSegmentFileSizes

      public boolean includeSegmentFileSizes()
    • includeSegmentFileSizes

      public IndicesStatsRequest includeSegmentFileSizes(boolean includeSegmentFileSizes)
    • includeUnloadedSegments

      public IndicesStatsRequest includeUnloadedSegments(boolean includeUnloadedSegments)
    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Overrides:
      writeTo in class BroadcastRequest<IndicesStatsRequest>
      Throws:
      IOException
    • 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
      Overrides:
      includeDataStreams in class BroadcastRequest<IndicesStatsRequest>