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,
  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

body

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