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 string

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.

typed_keys boolean

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

wait_for_completion_timeout string

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.

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
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error
root_cause object[]
Same fields as error
suppressed object[]
Same fields as error
response object required
aggregations map string to {} Aggregation result

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

_clusters object
skipped number required
successful number required
total number required
running number required
partial number required
failed number required
details map string to object
<string> object
status enum required
Values: running successful partial skipped failed
indices string required
took number
timed_out boolean required
_shards object
failed number required

The number of shards the operation or search attempted to run on but failed.

successful number required

The number of shards the operation or search succeeded on.

total number required

The number of shards the operation or search will run on overall.

failures object[]
index string
node string
reason object required
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as reason in failures
root_cause object[]
Same fields as reason in failures
suppressed object[]
Same fields as reason in failures
shard number
status string
primary boolean
skipped number
failures object[]
Same fields as failures in _shards
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
_explanation object
description string required
details object[] required
description string required
details object[]
Same fields as details in _explanation
value number required
value number required
fields map string to object
highlight map string to string
inner_hits map string to object
<string> object
hits object required
Same fields as hits in response
matched_queries union oneOf
One of: string[] or string to number
_nested object
field string required
offset number required
_nested object
Same fields as _nested in hits
_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.

profile object
shards object[] required
aggregations object[] required
breakdown object required
build_aggregation number required
build_aggregation_count number required
build_leaf_collector number required
build_leaf_collector_count number required
collect number required
collect_count number required
initialize number required
initialize_count number required
post_collection number
post_collection_count number
reduce number required
reduce_count number required
description string required
time_in_nanos number required
type string required
debug object
segments_with_multi_valued_ords number
collection_strategy string
segments_with_single_valued_ords number
total_buckets number
built_buckets number
result_strategy string
has_filter boolean
delegate string
delegate_debug object
Same fields as debug in aggregations
chars_fetched number
extract_count number
extract_ns number
values_fetched number
collect_analyzed_ns number
collect_analyzed_count number
surviving_buckets number
ordinals_collectors_used number
ordinals_collectors_overhead_too_high number
string_hashing_collectors_used number
numeric_collectors_used number
empty_collectors_used number
deferred_aggregators string[]
segments_with_doc_count_field number
segments_with_deleted_docs number
filters object[]
results_from_metadata number
query string
specialized_for string
segments_counted_in_constant_time number
segments_counted number
segments_collected number
map_reducer string
brute_force_used number
dynamic_pruning_attempted number
dynamic_pruning_used number
skipped_due_to_no_data number
children object[]
Same fields as aggregations in shards
cluster string required
dfs object
statistics object
type string required
description string required
time string
time_in_nanos number required
breakdown object required
collection_statistics number required
collection_statistics_count number required
create_weight number required
create_weight_count number required
rewrite number required
rewrite_count number required
term_statistics number required
term_statistics_count number required
debug map string to object
children object[]
Same fields as statistics in dfs
knn object[]
vector_operations_count number
query object[] required
type string required
description string required
time string
time_in_nanos number required
breakdown object required
advance number required
advance_count number required
build_scorer number required
build_scorer_count number required
compute_max_score number required
compute_max_score_count number required
count_weight number required
count_weight_count number required
create_weight number required
create_weight_count number required
match number required
match_count number required
next_doc number required
next_doc_count number required
score number required
score_count number required
set_min_competitive_score number required
set_min_competitive_score_count number required
shallow_advance number required
shallow_advance_count number required
debug map string to object
children object[]
Same fields as query in knn
rewrite_time number required
collector object[] required
name string required
reason string required
time string
time_in_nanos number required
children object[]
Same fields as collector in knn
fetch object
type string required
description string required
time_in_nanos number required
breakdown object required
load_source number
load_source_count number
load_stored_fields number
load_stored_fields_count number
next_reader number
next_reader_count number
process_count number
process number
debug object
stored_fields string[]
fast_path number
children object[]
Same fields as fetch in shards
id string required
index string required
node_id string required
searches object[] required
collector object[] required
name string required
reason string required
time_in_nanos number required
children object[]
Same fields as collector in searches
query object[] required
breakdown object required
advance number required
advance_count number required
build_scorer number required
build_scorer_count number required
create_weight number required
create_weight_count number required
match number required
match_count number required
shallow_advance number required
shallow_advance_count number required
next_doc number required
next_doc_count number required
score number required
score_count number required
compute_max_score number required
compute_max_score_count number required
count_weight number required
count_weight_count number required
set_min_competitive_score number required
set_min_competitive_score_count number required
description string required
time_in_nanos number required
type string required
children object[]
Same fields as query in searches
rewrite_time number required
shard_id number required
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
application/json
is_partial boolean required
is_running boolean required
expiration_time union oneOf
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
One of: string or number
completion_time_in_millis number
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error
root_cause object[]
Same fields as error
suppressed object[]
Same fields as error
response object
aggregations map string to {} Aggregation result

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

_clusters object
Same fields as _clusters in response
fields map string to object
hits object required
Same fields as hits in response
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.

profile object
shards object[] required
aggregations object[] required
breakdown object required
Same fields as breakdown in aggregations
description string required
time_in_nanos number required
type string required
debug object
Same fields as debug in aggregations
children object[]
Same fields as aggregations in shards
cluster string required
dfs object
statistics object
Same fields as statistics in dfs
knn object[]
vector_operations_count number
query object[] required
Same fields as query in knn
rewrite_time number required
collector object[] required
name string required
reason string required
time string
time_in_nanos number required
children object[]
Same fields as collector in knn
fetch object
Same fields as fetch in shards
id string required
index string required
node_id string required
searches object[] required
collector object[] required
name string required
reason string required
time_in_nanos number required
children object[]
Same fields as collector in searches
query object[] required
Same fields as query in searches
rewrite_time number required
shard_id number required
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
application/json
is_partial boolean required
is_running boolean required
expiration_time union oneOf
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
One of: string or number
completion_time_in_millis number
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error
root_cause object[]
Same fields as error
suppressed object[]
Same fields as error
response object
Same fields as response
application/json
is_partial boolean required
is_running boolean required
expiration_time union oneOf
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
One of: string or number
completion_time_in_millis number
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error
root_cause object[]
Same fields as error
suppressed object[]
Same fields as error
response object
Same fields as response
application/json
is_partial boolean required
is_running boolean required
expiration_time union oneOf
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
One of: string or number
completion_time_in_millis number
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error
root_cause object[]
Same fields as error
suppressed object[]
Same fields as error
response object
Same fields as response