msearchedit

client.msearch({
  index: string | string[],
  type: string | string[],
  search_type: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch',
  max_concurrent_searches: number,
  typed_keys: boolean,
  pre_filter_shard_size: number,
  max_concurrent_shard_requests: number,
  rest_total_hits_as_int: boolean,
  body: object
})

Reference

index

string | string[] - A comma-separated list of index names to use as default

type

string | string[] - A comma-separated list of document types to use as default

search_type or searchType

'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch' - Search operation type

max_concurrent_searches or maxConcurrentSearches

number - Controls the maximum number of concurrent searches the multi search api will execute

typed_keys or typedKeys

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

pre_filter_shard_size or preFilterShardSize

number - 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 it’s rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
Default: 128

max_concurrent_shard_requests or maxConcurrentShardRequests

number - The number of concurrent shard requests each sub 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
Default: The default grows with the number of nodes in the cluster but is at most 256.

rest_total_hits_as_int or restTotalHitsAsInt

boolean - This parameter is ignored in this version. It is used in the next major version to control whether the rest response should render the total.hits as an object or a number

body

object - The request definitions (metadata-search request definition pairs), separated by newlines