msearchTemplate

edit
client.msearchTemplate({
  index: string | string[],
  type: string | string[],
  search_type: 'query_then_fetch' | 'query_and_fetch' | 'dfs_query_then_fetch' | 'dfs_query_and_fetch',
  typed_keys: boolean,
  max_concurrent_searches: 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

typed_keys or typedKeys

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

max_concurrent_searches or maxConcurrentSearches

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

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