Class AsyncSearchResponse
java.lang.Object
org.elasticsearch.client.asyncsearch.AsyncSearchResponse
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
public class AsyncSearchResponse
extends Object
implements org.elasticsearch.xcontent.ToXContentObject
A response of an async search request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ConstructingObjectParser<AsyncSearchResponse,
Void> static final org.elasticsearch.xcontent.ParseField
static final org.elasticsearch.xcontent.ParseField
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Method Summary
Modifier and TypeMethodDescriptionstatic AsyncSearchResponse
fromXContent
(org.elasticsearch.xcontent.XContentParser parser) long
When this response will expired as a timestamp in milliseconds since epoch.Returns the failure reason or null if the query is running or has completed normally.getId()
Returns the id of the async search request or null if the response is not stored in the cluster.Returns the currentSearchResponse
ornull
if not available.long
When this response was created as a timestamp in milliseconds since epoch.boolean
Returnstrue
if theSearchResponse
contains partial results computed from a subset of the total shards.boolean
Whether the search is still running in the cluster.toString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
ID_FIELD
public static final org.elasticsearch.xcontent.ParseField ID_FIELD -
IS_PARTIAL_FIELD
public static final org.elasticsearch.xcontent.ParseField IS_PARTIAL_FIELD -
IS_RUNNING_FIELD
public static final org.elasticsearch.xcontent.ParseField IS_RUNNING_FIELD -
START_TIME_FIELD
public static final org.elasticsearch.xcontent.ParseField START_TIME_FIELD -
EXPIRATION_FIELD
public static final org.elasticsearch.xcontent.ParseField EXPIRATION_FIELD -
RESPONSE_FIELD
public static final org.elasticsearch.xcontent.ParseField RESPONSE_FIELD -
ERROR_FIELD
public static final org.elasticsearch.xcontent.ParseField ERROR_FIELD -
PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<AsyncSearchResponse,Void> PARSER
-
-
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 currentSearchResponse
ornull
if 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()Returnstrue
if theSearchResponse
contains 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 offalse
indicates 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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-
fromXContent
-
toString
-