younifyd
Menu

Run an async search (POST /{index}/_async_search)

Run an async search

POST/{index}/_async_search

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Run an async search (POST /{index}/_async_search) action (under search).
  3. Fill in the fields below, then reference the result from later steps as {{runAnAsyncSearchPostIndexAsyncSearch.response.data}}.

Request

Path parameters

indexoneOfrequired

A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices

Query parameters

wait_for_completion_timeoutoneOf

Blocks 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_aliveoneOf

Specifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period.

keep_on_completionboolean

If `true`, results are stored for later retrieval when the search completes within the `wait_for_completion_timeout`.

allow_no_indicesboolean

A 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_resultsboolean

Indicate if an error should be returned if there is a partial search failure or timeout

analyzerstring

The analyzer to use for the query string

analyze_wildcardboolean

Specify whether wildcard and prefix queries should be analyzed

batched_reduce_sizenumber

Affects 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_roundtripsboolean

The default value is the only supported value.

default_operatorstring

The default operator for query string query (AND or OR)

One ofandANDorOR

dfstring

The field to use as default where no field prefix is given in the query string

docvalue_fieldsoneOf

A comma-separated list of fields to return as the docvalue representation of a field for each hit

expand_wildcardsoneOf

Whether to expand wildcard expression to concrete indices that are open, closed or both

explainboolean

Specify whether to return detailed information about score computation as part of a hit

ignore_throttledboolean

Whether specified concrete, expanded or aliased indices should be ignored when throttled

ignore_unavailableboolean

If `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.

lenientboolean

Specify whether format-based query failures (such as providing text to a numeric field) should be ignored

max_concurrent_shard_requestsnumber

The 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

preferencestring

Specify the node or shard the operation should be performed on

request_cacheboolean

Specify if request cache should be used for this request or not, defaults to true

routingoneOf

A comma-separated list of specific routing values

search_typestring

Search operation type

One ofquery_then_fetchdfs_query_then_fetch

statsarray<string>

Specific 'tag' of the request for logging and statistical purposes

stored_fieldsoneOf

A comma-separated list of stored fields to return as part of a hit

suggest_fieldstring

Specifies which field to use for suggestions.

suggest_modestring

Specify suggest mode

One ofmissingpopularalways

suggest_sizenumber

How many suggestions to return in response

suggest_textstring

The source text for which the suggestions should be returned.

terminate_afternumber

The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early

timeoutoneOf

Explicit operation timeout

track_total_hitsoneOf

Indicate 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_scoresboolean

Whether to calculate and return scores even if they are not used for sorting

typed_keysboolean

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

rest_total_hits_as_intboolean

Indicates whether hits.total should be rendered as an integer or an object in the rest search response

versionboolean

Specify whether to return document version as part of a hit

_sourceoneOf

True or false to return the _source field or not, or a list of fields to return

_source_excludesoneOf

A list of fields to exclude from the returned _source field

_source_includesoneOf

A list of fields to extract and return from the _source field

seq_no_primary_termboolean

Specify whether to return sequence number and primary term of the last modification of each hit

qstring

Query in the Lucene query string syntax

sizenumber

Number of hits to return

fromnumber

Starting offset

sortoneOf

A comma-separated list of <field>:<direction> pairs

Response

Returns 200 with a any. Read it in later steps with {{runAnAsyncSearchPostIndexAsyncSearch.response.data.<field>}}.

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Run an async search (POST /{index}/_async_search) — Elasticsearch — Documentation