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

    Fields
    Modifier and Type
    Field
    Description
    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.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 Type
    Method
    Description
    fromXContent(org.elasticsearch.xcontent.XContentParser parser)
     
    long
    When this response will expired as a timestamp in milliseconds since epoch.
    org.elasticsearch.ElasticsearchException
    Returns the failure reason or null if the query is running or has completed normally.
    Returns the id of the async search request or null if the response is not stored in the cluster.
    org.elasticsearch.action.search.SearchResponse
    Returns the current SearchResponse or null if not available.
    long
    When this response was created as a timestamp in milliseconds since epoch.
    boolean
    Returns true if the SearchResponse contains partial results computed from a subset of the total shards.
    boolean
    Whether the search is still running in the cluster.
     
    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

      @Nullable public String getId()
      Returns the id of the async search request or null if the response is not stored in the cluster.
    • getSearchResponse

      public org.elasticsearch.action.search.SearchResponse getSearchResponse()
      Returns the current SearchResponse or null if not available. See isPartial() to determine whether the response contains partial or complete results.
    • getFailure

      public org.elasticsearch.ElasticsearchException getFailure()
      Returns the failure reason or null if the query is running or has completed normally.
    • isPartial

      public boolean isPartial()
      Returns true if the SearchResponse 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 of false indicates that the response is final even if isPartial() returns true. 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 interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • fromXContent

      public static AsyncSearchResponse fromXContent(org.elasticsearch.xcontent.XContentParser parser)
    • toString

      public String toString()
      Overrides:
      toString in class Object