Menu
Run an async search (POST /_async_search)
Run an async search
/_async_searchUse it in a workflow
- Add a step and choose the Elasticsearch connector.
- Pick the Run an async search (POST /_async_search) action (under search).
- Fill in the fields below, then reference the result from later steps as
{{runAnAsyncSearchPostAsyncSearch.response.data}}.
Request
Query parameters
wait_for_completion_timeoutoneOfBlocks and waits until the search is completed up to a certain timeout. When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
keep_aliveoneOfSpecifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period.
keep_on_completionbooleanIf `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.
allow_no_indicesbooleanA setting that does two separate checks on the index expression. If `false`, the request returns an error (1) if any wildcard expression (including `_all` and `*`) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. If `true`, index expressions that resolve to no indices are allowed and the request returns an empty result.
allow_partial_search_resultsbooleanIndicate if an error should be returned if there is a partial search failure or timeout
analyzerstringThe analyzer to use for the query string
analyze_wildcardbooleanSpecify whether wildcard and prefix queries should be analyzed
batched_reduce_sizenumberAffects how often partial results become available, which happens whenever shard results are reduced. A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).
ccs_minimize_roundtripsbooleanThe default value is the only supported value.
default_operatorstringThe default operator for query string query (AND or OR)
One ofandANDorOR
dfstringThe field to use as default where no field prefix is given in the query string
docvalue_fieldsoneOfA comma-separated list of fields to return as the docvalue representation of a field for each hit
expand_wildcardsoneOfWhether to expand wildcard expression to concrete indices that are open, closed or both
explainbooleanSpecify whether to return detailed information about score computation as part of a hit
ignore_throttledbooleanWhether specified concrete, expanded or aliased indices should be ignored when throttled
ignore_unavailablebooleanIf `false`, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If `true`, unavailable concrete targets are silently ignored.
lenientbooleanSpecify whether format-based query failures (such as providing text to a numeric field) should be ignored
max_concurrent_shard_requestsnumberThe number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
preferencestringSpecify the node or shard the operation should be performed on
request_cachebooleanSpecify if request cache should be used for this request or not, defaults to true
routingoneOfA comma-separated list of specific routing values
search_typestringSearch operation type
One ofquery_then_fetchdfs_query_then_fetch
statsarray<string>Specific 'tag' of the request for logging and statistical purposes
stored_fieldsoneOfA comma-separated list of stored fields to return as part of a hit
suggest_fieldstringSpecifies which field to use for suggestions.
suggest_modestringSpecify suggest mode
One ofmissingpopularalways
suggest_sizenumberHow many suggestions to return in response
suggest_textstringThe source text for which the suggestions should be returned.
terminate_afternumberThe maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early
timeoutoneOfExplicit operation timeout
track_total_hitsoneOfIndicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
track_scoresbooleanWhether to calculate and return scores even if they are not used for sorting
typed_keysbooleanSpecify whether aggregation and suggester names should be prefixed by their respective types in the response
rest_total_hits_as_intbooleanIndicates whether hits.total should be rendered as an integer or an object in the rest search response
versionbooleanSpecify whether to return document version as part of a hit
_sourceoneOfTrue or false to return the _source field or not, or a list of fields to return
_source_excludesoneOfA list of fields to exclude from the returned _source field
_source_includesoneOfA list of fields to extract and return from the _source field
seq_no_primary_termbooleanSpecify whether to return sequence number and primary term of the last modification of each hit
qstringQuery in the Lucene query string syntax
sizenumberNumber of hits to return
fromnumberStarting offset
sortoneOfA comma-separated list of <field>:<direction> pairs
Response
Returns 200 with a any. Read it in later steps with {{runAnAsyncSearchPostAsyncSearch.response.data.<field>}}.
Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.