younifyd
Menu

Run multiple searches (POST /{index}/_msearch)

Run multiple searches

POST/{index}/_msearch

Use it in a workflow

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

Request

Path parameters

indexoneOfrequired

Comma-separated list of data streams, indices, and index aliases to search.

Query parameters

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.

ccs_minimize_roundtripsboolean

If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests.

expand_wildcardsoneOf

Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.

ignore_throttledboolean

If true, concrete, expanded or aliased indices are ignored when frozen.

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.

include_named_queries_scoreboolean

Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) This functionality reruns each named query on every hit in a search response. Typically, this adds a small overhead to a request. However, using computationally expensive named queries on a large number of hits may add significant overhead.

indexoneOf

Comma-separated list of data streams, indices, and index aliases to use as default

max_concurrent_searchesnumber

Maximum number of concurrent searches the multi search API can execute. Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.

max_concurrent_shard_requestsnumber

Maximum number of concurrent shard requests that each sub-search request executes per node.

pre_filter_shard_sizenumber

Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.

rest_total_hits_as_intboolean

If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.

routingoneOf

Custom routing value used to route search operations to a specific shard. Not allowed when `index.slice.enabled` is `true` for the target index; use `_slice` instead.

search_typestring

Indicates whether global term and document frequencies should be used when scoring returned documents.

One ofquery_then_fetchdfs_query_then_fetch

typed_keysboolean

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

Response

Returns 200 with an object. Read it in later steps with {{runMultipleSearchesPostIndexMsearch.response.data.<field>}}.

tooknumber
responsesarray<oneOf>
json
{
  "took": 0,
  "responses": [
    null
  ]
}

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