Package org.elasticsearch.client.core
Class CountResponse
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportResponse
-
- org.elasticsearch.action.ActionResponse
-
- org.elasticsearch.client.core.CountResponse
-
- All Implemented Interfaces:
Streamable,Writeable
public final class CountResponse extends ActionResponse
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.-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportResponse
TransportResponse.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description CountResponse(long count, java.lang.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.java.lang.BooleanisTerminatedEarly()RestStatusstatus()java.lang.StringtoString()-
Methods inherited from class org.elasticsearch.action.ActionResponse
readFrom, writeTo
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
-
-
-
Constructor Detail
-
CountResponse
public CountResponse(long count, java.lang.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 java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
isTerminatedEarly
public java.lang.Boolean isTerminatedEarly()
-
-