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
-
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.External documentation -
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
-
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.
External documentation -
Specifies whether the response should contain intermediate results if the query is still running when the wait_for_completion_timeout expires or if no wait_for_completion_timeout is specified. If true and the search is still running, the search response will include any hits and partial aggregations that are available. If false and the search is still running, the search response will not include any hits (but possibly include total hits) nor will include any partial aggregations. When not specified, the intermediate results are returned for running queries.
Responses
-
Hide response attributes Show response attributes object
-
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. -
Indicates whether the search is still running or has completed.
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_runningisfalse. -
Time unit for milliseconds
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide error attributes Show error attributes object
-
The type of error
-
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Hide response attributes Show response attributes object
-
Partial aggregations results, coming from the shards that have already completed running the query.
-
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.
-
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.
-
-
Hide response attributes Show response attributes object
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide error attributes Show error attributes object
-
The type of error
-
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Hide response attributes Show response attributes object
-
Partial aggregations results, coming from the shards that have already completed running the query.
-
Hide _clusters attributes Show _clusters attributes object
-
Hide hits attributes Show hits attributes object
-
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.
-
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.
Hide _shards attributes Show _shards attributes object
-
The number of shards the operation or search attempted to run on but failed.
-
The number of shards the operation or search succeeded on.
-
The number of shards the operation or search will run on overall.
-
-
-
-
Hide response attributes Show response attributes object
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide error attributes Show error attributes object
-
The type of error
-
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Hide response attributes Show response attributes object
-
Partial aggregations results, coming from the shards that have already completed running the query.
-
Hide _clusters attributes Show _clusters attributes object
-
Hide hits attributes Show hits attributes object
-
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.
-
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.
Hide _shards attributes Show _shards attributes object
-
The number of shards the operation or search attempted to run on but failed.
-
The number of shards the operation or search succeeded on.
-
The number of shards the operation or search will run on overall.
-
-
-
-
Hide response attributes Show response attributes object
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide error attributes Show error attributes object
-
The type of error
-
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Hide response attributes Show response attributes object
-
Partial aggregations results, coming from the shards that have already completed running the query.
-
Hide _clusters attributes Show _clusters attributes object
-
Hide hits attributes Show hits attributes object
-
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.
-
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.
Hide _shards attributes Show _shards attributes object
-
The number of shards the operation or search attempted to run on but failed.
-
The number of shards the operation or search succeeded on.
-
The number of shards the operation or search will run on overall.
-
-
-
-
Hide response attributes Show response attributes object
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide error attributes Show error attributes object
-
The type of error
-
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Hide response attributes Show response attributes object
-
Partial aggregations results, coming from the shards that have already completed running the query.
-
Hide _clusters attributes Show _clusters attributes object
-
Hide hits attributes Show hits attributes object
-
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.
-
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.
Hide _shards attributes Show _shards attributes object
-
The number of shards the operation or search attempted to run on but failed.
-
The number of shards the operation or search succeeded on.
-
The number of shards the operation or search will run on overall.
-
-
-
GET /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=
resp = client.async_search.get(
id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
)
const response = await client.asyncSearch.get({
id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
});
response = client.async_search.get(
id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
)
$resp = $client->asyncSearch()->get([
"id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
var response = await client.AsyncSearch.GetAsync<MyDocument>(id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=");
client.asyncSearch().get(g -> g
.id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=")
);
{
"id" : "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
"is_partial" : false,
"is_running" : false,
"start_time_in_millis" : 1583945890986,
"expiration_time_in_millis" : 1584377890986,
"completion_time_in_millis" : 1583945903130,
"response" : {
"took" : 12144,
"timed_out" : false,
"num_reduce_phases" : 46,
"_shards" : {
"total" : 562,
"successful" : 188,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 456433,
"relation" : "eq"
},
"max_score" : null,
"hits" : [ ]
},
"aggregations" : {
"sale_date" : {
"buckets" : []
}
}
}
}