[[reference-shared-types-search_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>                                                                    ||
||                                                                                                                       ||
||                                                                                                                       ||
||                                                                                                                       ||
===========================================================================================================================
////////



== Shared SearchTemplate types


[discrete]
[[SearchTemplateRequest]]
=== SearchTemplateRequest

[pass]
++++
<pre>
++++
interface SearchTemplateRequest extends <<RequestBase>> {
  index?: <<Indices>>
  allow_no_indices?: boolean
  ccs_minimize_roundtrips?: boolean
  expand_wildcards?: <<ExpandWildcards>>
  ignore_throttled?: boolean
  ignore_unavailable?: boolean
  preference?: string
  routing?: <<Routing>>
  scroll?: <<Duration>>
  search_type?: <<SearchType>>
  rest_total_hits_as_int?: boolean
  typed_keys?: boolean
  explain?: boolean
  id?: <<Id>>
  params?: Record<string, any>
  profile?: boolean
  source?: string
}
[pass]
++++
</pre>
++++

[discrete]
[[SearchTemplateResponse]]
=== SearchTemplateResponse

[pass]
++++
<pre>
++++
interface SearchTemplateResponse<TDocument = unknown> {
  took: <<long>>
  timed_out: boolean
  _shards: <<ShardStatistics>>
  hits: <<SearchHitsMetadata>><TDocument>
  aggregations?: Record<<<AggregateName>>, <<AggregationsAggregate>>>
  _clusters?: <<ClusterStatistics>>
  fields?: Record<string, any>
  max_score?: <<double>>
  num_reduce_phases?: <<long>>
  profile?: <<SearchProfile>>
  pit_id?: <<Id>>
  _scroll_id?: <<ScrollId>>
  suggest?: Record<<<SuggestionName>>, <<SearchSuggest>><TDocument>[]>
  terminated_early?: boolean
}
[pass]
++++
</pre>
++++
