Package org.elasticsearch.client.core
Class CountResponse
- java.lang.Object
-
- org.elasticsearch.client.core.CountResponse
-
public final class CountResponse extends 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, Boolean terminatedEarly, CountResponse.ShardStats shardStats)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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.BooleanisTerminatedEarly()RestStatusstatus()StringtoString()
-
-
-
Constructor Detail
-
CountResponse
public CountResponse(long count, Boolean terminatedEarly, CountResponse.ShardStats shardStats)
-
-
Method Detail
-
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 ShardSearchFailure[] getShardFailures()
The failures that occurred during the search.
-
status
public RestStatus status()
-
fromXContent
public static CountResponse fromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
isTerminatedEarly
public Boolean isTerminatedEarly()
-
-