younifyd
Menu

Msearch (POST /_msearch)

Msearch

POST/_msearch

Use it in a workflow

  1. Add a step and choose the OpenSearch connector.
  2. Pick the Msearch (POST /_msearch) action (under core).
  3. Fill in the fields below, then reference the result from later steps as {{msearchPostMsearch.response.data}}.

Request

Query parameters

allow_partial_resultsboolean

Specifies whether to return partial results if there are shard request timeouts or shard failures

Default true

ccs_minimize_roundtripsboolean

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

Default true

max_concurrent_searchesinteger (int32)

Maximum number of concurrent searches the multi search API can execute.

max_concurrent_shard_requestsinteger (int32)

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

Default 5

pre_filter_shard_sizeinteger (int32)

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.

Default false

search_typeoneOf

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

typed_keysboolean

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

prettyboolean

Whether to pretty-format the returned JSON response.

Default false

humanboolean

Whether to return human-readable values for statistics.

Default false

error_traceboolean

Whether to include the stack trace of returned errors.

Default false

sourcestring

The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

filter_pathoneOf

A comma-separated list of filters used to filter the response. Use wildcards to match any field or part of a field's name. To exclude fields, use `-`.

Response

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

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

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