Package org.elasticsearch.client.core
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 classCountResponse.ShardStatsEncapsulates _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 CountResponsefromXContent(XContentParser parser)longgetCount()Number of documents matching request.intgetFailedShards()The failed number of shards the search was executed on.ShardSearchFailure[]getShardFailures()The failures that occurred during the search.CountResponse.ShardStatsgetShardStats()intgetSkippedShards()The number of shards skipped due to pre-filteringintgetSuccessfulShards()The successful number of shards the search was executed on.intgetTotalShards()The total number of shards the search was executed on.java.lang.BooleanisTerminatedEarly()RestStatusstatus()java.lang.StringtoString()
-
Constructor Details
-
CountResponse
public CountResponse(long count, java.lang.Boolean terminatedEarly, CountResponse.ShardStats shardStats)
-
-
Method Details
-
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
The failures that occurred during the search. -
status
-
fromXContent
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
isTerminatedEarly
public java.lang.Boolean isTerminatedEarly()
-