Get async search results
- GET /_async_search/{id}
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.
Query parameters
-
keep_alivestring -
The length of time that the async search should be available in the cluster. When not specified, the
keep_aliveset 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. - Reference
-
typed_keysboolean -
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
-
wait_for_completion_timeoutstring -
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.
- Reference
Response
-
is_partialbooleanrequired -
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_partialis always set totrue. -
is_runningbooleanrequired -
Indicates whether the search is still running or has completed.
NoteIf 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_runningisfalse. -
completion_timeunion -
Indicates when the async search completed. It is present only when the search has completed.
-
responseobjectrequired -
aggregationsmap string to Aggregation result -
Partial aggregations results, coming from the shards that have already completed running the query.
-
num_reduce_phasesnumber -
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.
-
profileobject