Class IndicesStatsRequest

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

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.

  • Constructor Details

    • IndicesStatsRequest

      public IndicesStatsRequest()
    • IndicesStatsRequest

      public IndicesStatsRequest​(StreamInput in) throws java.io.IOException
      Throws:
      java.io.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.
    • types

      public IndicesStatsRequest types​(java.lang.String... types)
      Document types to return stats for. Mainly affects indexing(boolean) when enabled, returning specific indexing stats for those types.
    • types

      public java.lang.String[] types()
      Document types to return stats for. Mainly affects indexing(boolean) when enabled, returning specific indexing stats for those types.
    • groups

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

      public java.lang.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​(java.lang.String... fieldDataFields)
    • fieldDataFields

      public java.lang.String[] fieldDataFields()
    • completion

      public IndicesStatsRequest completion​(boolean completion)
    • completion

      public boolean completion()
    • completionFields

      public IndicesStatsRequest completionFields​(java.lang.String... completionDataFields)
    • completionFields

      public java.lang.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​(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<IndicesStatsRequest>
      Throws:
      java.io.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>