Get async search results

  • GET /_async_search/{id}
Auth

Retrieve the results of a previously submitted asynchronous search request. If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.

Path parameters

id string required

A unique identifier for the async search.

Query parameters

keep_alive union oneOf

The length of time that the async search should be available in the cluster. When not specified, the keep_alive set with the corresponding submit async request will be used. Otherwise, it is possible to override the value and extend the validity of the request. When this period expires, the search, if still running, is cancelled. If the search is completed, its saved results are deleted.

Values: -1 0
typed_keys boolean

Specify whether aggregation and suggester names should be prefixed by their respective types in the response

wait_for_completion_timeout union oneOf

Specifies to wait for the search to be completed up until the provided timeout. Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires. By default no timeout is set meaning that the currently available results will be returned without any additional wait.

Values: -1 0

Responses

application/json
id string
is_partial boolean required

When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards. While the query is running, is_partial is always set to true.

is_running boolean required

Indicates whether the search is still running or has completed.

Note

If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though is_running is false.

expiration_time union oneOf

Indicates when the async search will expire.

One of: string or number
expiration_time_in_millis number required
start_time union oneOf
One of: string or number
start_time_in_millis number required
completion_time union oneOf

Indicates when the async search completed. It is present only when the search has completed.

One of: string or number
completion_time_in_millis number
response object required
aggregations map string to {} Aggregation result

Partial aggregations results, coming from the shards that have already completed running the query.

fields map string to object
hits object required
total union oneOf

Total hit count information, present only if track_total_hits wasn't false in the search request.

One of:
relation enum required

Supported values include:

  • eq: Accurate
  • gte: Lower bound, including returned events or sequences
Values: eq gte
value number required
hits object[] required
_index string required
_id string
_score union number | string nullable
fields map string to object
highlight map string to string
inner_hits map string to object
matched_queries union oneOf
One of: string[] or string to number
_ignored string[]
ignored_field_values map string to oneOf
_shard string
_node string
_routing string
_source object
_rank number
_seq_no number
_primary_term number
_version number
sort union[]
max_score union number | string nullable
max_score number
num_reduce_phases number

Indicates how many reductions of the results have been performed. If this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response.

pit_id string
_scroll_id string
_shards object required

Indicates how many shards have run the query. Note that in order for shard results to be included in the search response, they need to be reduced first.

Same fields as _shards in details
suggest map string to oneOf
terminated_early boolean
timed_out boolean required
took number required