Files
elasticsearch-js/docs/reference-msearch_template.asciidoc
2024-12-05 14:46:46 -06:00

67 lines
4.2 KiB
Plaintext

[[reference-msearch_template]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
=== client.msearchTemplate
Run multiple templated searches.
{ref}/search-multi-search.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(MsearchTemplateRequest, options?): Promise<MsearchTemplateResponse>
----
[discrete]
===== `MsearchTemplateRequest`
[source,ts]
----
interface MsearchTemplateRequest extends <<shared-type-request-base, RequestBase>> {
index?: <<shared-type-indices, Indices>>
ccs_minimize_roundtrips?: boolean
max_concurrent_searches?: <<shared-type-long, long>>
search_type?: <<shared-type-search-type, SearchType>>
rest_total_hits_as_int?: boolean
typed_keys?: boolean
search_templates?: MsearchTemplateRequestItem[]
}
----
[discrete]
===== `MsearchTemplateResponse`
[source,ts]
----
type MsearchTemplateResponse<TDocument = unknown, TAggregations = Record<<<shared-type-aggregate-name, AggregateName>>, AggregationsAggregate>> = MsearchMultiSearchResult<TDocument, TAggregations>
----