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 class
CountResponse.ShardStats
Encapsulates _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
Modifier and Type Method Description static CountResponse
fromXContent(XContentParser parser)
long
getCount()
Number of documents matching request.int
getFailedShards()
The failed number of shards the search was executed on.ShardSearchFailure[]
getShardFailures()
The failures that occurred during the search.CountResponse.ShardStats
getShardStats()
int
getSkippedShards()
The number of shards skipped due to pre-filteringint
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()
RestStatus
status()
java.lang.String
toString()
-
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:
toString
in classjava.lang.Object
-
isTerminatedEarly
public java.lang.Boolean isTerminatedEarly()
-
-