Class SearchStats

java.lang.Object
org.opensearch.index.search.stats.SearchStats
All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentFragment

@PublicApi(since="1.0.0") public class SearchStats extends Object implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentFragment
Encapsulates stats for search time
Opensearch.api:
  • Constructor Details

  • Method Details

    • setSearchRequestStats

      public void setSearchRequestStats(SearchRequestStats searchRequestStats)
    • add

      public void add(SearchStats searchStats)
    • addTotals

      public void addTotals(SearchStats searchStats)
    • addTotalsForClosingShard

      public void addTotalsForClosingShard(SearchStats searchStats)
    • getTotal

      public SearchStats.Stats getTotal()
    • getOpenContexts

      public long getOpenContexts()
    • getGroupStats

      @Nullable public Map<String,SearchStats.Stats> getGroupStats()
    • toXContent

      public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.opensearch.core.xcontent.ToXContent
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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
      Throws:
      IOException