anchor.diff:  // CONSOLE
   // TEST[setup:twitter]
   
  +[[search-template-api-request]]
  +==== {api-request-title}
  +
  +`GET _search/template`
  +
  +
  +[[search-template-api-desc]]
  +==== {api-description-title}
  +
  +The `/_search/template` endpoint allows you to use the mustache language to pre- 
  +render search requests, before they are executed and fill existing templates 
  +with template parameters.
  +
   For more information on how Mustache templating and what kind of templating you
   can do with it check out the http://mustache.github.io/mustache.5.html[online
   documentation of the mustache project].
   
  -NOTE: The mustache language is implemented in Elasticsearch as a sandboxed
  -scripting language, hence it obeys settings that may be used to enable or
  -disable scripts per type and context as described in the
  -<<allowed-script-types-setting, scripting docs>>
  -
  -[float]
  -==== Examples
  -
  -[float]
  +NOTE: The mustache language is implemented in {es} as a sandboxed scripting 
  +language, hence it obeys settings that may be used to enable or disable scripts 
  +per type and context as described in the 
  +<<allowed-script-types-setting, scripting docs>>.
  +
  +
  +[[search-template-api-path-params]]
  +==== {api-path-parms-title}
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=index]
  +
  +
  +[[search-template-api-query-params]]
  +==== {api-query-parms-title}
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  +
  +`ccs_minimize_roundtrips`::
  +  (Optional, boolean) If `true`, network round-trips are minimized for 
  + cross-cluster search requests. Defaults to `true`.
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  +
  +`explain`::
  +  (Optional, boolean) If `true`, the response includes additional details about 
  +  score computation as part of a hit. Defaults to `false`.
  +
  +`ignore_throttled`::
  +  (Optional, boolean) If `true`, specified concrete, expanded or aliased indices 
  +  are not included in the response when throttled. Defaults to `false`. 
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=preference]
  +
  +`profile`::
  +  (Optional, boolean) If `true`, the query execution is profiled. Defaults 
  +  to `false`.
  +
  +`rest_total_hits_as_int`::
  +  (Optional, boolean) If `true`, `hits.total` are rendered as an integer in 
  +  the response. Defaults to `false`.
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=routing]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=scroll]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=search_type]
  +
  +`typed_keys`::
  +  (Optional, boolean) If `true`, aggregation and suggester names are 
  +  prefixed by their respective types in the response. Defaults to `false`.
  +  
  +
  +[[search-template-api-request-body]]
  +==== {api-request-body-title}
  +
  +The API request body must contain the search definition template and its parameters.
  +
  +
  +[[search-template-api-example]]
  +==== {api-response-codes-title}
  +
  +
   [[pre-registered-templates]]
   ===== Store a search template
   
  
positive.code: ------------------------------------------
  // NOTCONSOLE
  
  [float]
  ===== Conditional clauses
  
  Conditional clauses cannot be expressed using the JSON form of the template.
  
negative.code: ------------------------------------------
  // NOTCONSOLE
  <1> All three of these elements are optional.
  
  
  We could write the query as:
  
  