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
Responses
-
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 oneOf -
Indicates when the async search completed. It is present only when the search has completed.
-
One of:
stringornumber -
responseobjectrequired -
aggregationsmap string to {} Aggregation result -
Partial aggregations results, coming from the shards that have already completed running the query.
-
_clustersobject -
detailsmap string to object -
<string>object -
failuresobject[] -
Same fields as
failuresin_shards -
hitsobjectrequired -
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 -
shardsobject[]required -
aggregationsobject[]required -
childrenobject[] -
Same fields as
aggregationsinshards -
dfsobject -
_shardsobjectrequired -
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
_shardsindetails
-
responseobject -
aggregationsmap string to {} Aggregation result -
Partial aggregations results, coming from the shards that have already completed running the query.
-
_clustersobject -
Same fields as
_clustersinresponse -
hitsobjectrequired -
Same fields as
hitsinresponse -
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 -
shardsobject[]required -
aggregationsobject[]required -
breakdownobjectrequired -
Same fields as
breakdowninaggregations -
debugobject -
Same fields as
debuginaggregations -
childrenobject[] -
Same fields as
aggregationsinshards -
fetchobject -
Same fields as
fetchinshards -
_shardsobjectrequired -
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
_shardsindetails