Class AsyncSearchResponse
java.lang.Object
org.elasticsearch.client.asyncsearch.AsyncSearchResponse
- All Implemented Interfaces:
ToXContent,ToXContentObject
public class AsyncSearchResponse extends java.lang.Object implements ToXContentObject
A response of an async search request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params -
Field Summary
Fields Modifier and Type Field Description static ParseFieldERROR_FIELDstatic ParseFieldEXPIRATION_FIELDstatic ParseFieldID_FIELDstatic ParseFieldIS_PARTIAL_FIELDstatic ParseFieldIS_RUNNING_FIELDstatic ConstructingObjectParser<AsyncSearchResponse,java.lang.Void>PARSERstatic ParseFieldRESPONSE_FIELDstatic ParseFieldSTART_TIME_FIELD -
Method Summary
Modifier and Type Method Description static AsyncSearchResponsefromXContent(XContentParser parser)longgetExpirationTime()When this response will expired as a timestamp in milliseconds since epoch.ElasticsearchExceptiongetFailure()Returns the failure reason or null if the query is running or has completed normally.java.lang.StringgetId()Returns the id of the async search request or null if the response is not stored in the cluster.SearchResponsegetSearchResponse()Returns the currentSearchResponseornullif not available.longgetStartTime()When this response was created as a timestamp in milliseconds since epoch.booleanisPartial()Returnstrueif theSearchResponsecontains partial results computed from a subset of the total shards.booleanisRunning()Whether the search is still running in the cluster.java.lang.StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)
-
Field Details
-
Method Details
-
getId
Returns the id of the async search request or null if the response is not stored in the cluster. -
getSearchResponse
Returns the currentSearchResponseornullif not available. SeeisPartial()to determine whether the response contains partial or complete results. -
getFailure
Returns the failure reason or null if the query is running or has completed normally. -
isPartial
public boolean isPartial()Returnstrueif theSearchResponsecontains partial results computed from a subset of the total shards. -
isRunning
public boolean isRunning()Whether the search is still running in the cluster. A value offalseindicates that the response is final even ifisPartial()returnstrue. In such case, the partial response represents the status of the search before a non-recoverable failure. -
getStartTime
public long getStartTime()When this response was created as a timestamp in milliseconds since epoch. -
getExpirationTime
public long getExpirationTime()When this response will expired as a timestamp in milliseconds since epoch. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
fromXContent
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-