Class CountResponse

java.lang.Object
org.elasticsearch.client.core.CountResponse

public final class CountResponse
extends java.lang.Object
A response to _count API request.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  CountResponse.ShardStats
    Encapsulates _shards section of count api response.
  • Constructor Summary

    Constructors 
    Constructor Description
    CountResponse​(long count, java.lang.Boolean terminatedEarly, CountResponse.ShardStats shardStats)  
  • Method Summary

    Modifier and Type Method Description
    static CountResponse fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)  
    long getCount()
    Number of documents matching request.
    int getFailedShards()
    The failed number of shards the search was executed on.
    org.elasticsearch.action.search.ShardSearchFailure[] getShardFailures()
    The failures that occurred during the search.
    CountResponse.ShardStats getShardStats()  
    int getSkippedShards()
    The number of shards skipped due to pre-filtering
    int getSuccessfulShards()
    The successful number of shards the search was executed on.
    int getTotalShards()
    The total number of shards the search was executed on.
    java.lang.Boolean isTerminatedEarly()  
    org.elasticsearch.rest.RestStatus status()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • getShardStats

      public CountResponse.ShardStats getShardStats()
    • getCount

      public long getCount()
      Number of documents matching request.
    • getTotalShards

      public int getTotalShards()
      The total number of shards the search was executed on.
    • getSuccessfulShards

      public int getSuccessfulShards()
      The successful number of shards the search was executed on.
    • getSkippedShards

      public int getSkippedShards()
      The number of shards skipped due to pre-filtering
    • getFailedShards

      public int getFailedShards()
      The failed number of shards the search was executed on.
    • getShardFailures

      public org.elasticsearch.action.search.ShardSearchFailure[] getShardFailures()
      The failures that occurred during the search.
    • status

      public org.elasticsearch.rest.RestStatus status()
    • fromXContent

      public static CountResponse fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException
      Throws:
      java.io.IOException
    • toString

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

      public java.lang.Boolean isTerminatedEarly()