anchor.diff:  // CONSOLE
   // TEST[setup:twitter]
   
  -for inline templates.
   
   You can also create search templates:
   
  
positive.code: // CONSOLE
  // TEST[continued]
  
  [float]
  [[multi-search-partial-responses]]
  ==== Partial responses
  To ensure fast responses, the multi search API will respond with partial results if one or more shards fail. See <<shard-failures, Shard failures>> for more information.
negative.code: may be preceded by a carriage return `\r`. When sending requests to this endpoint the
  `Content-Type` header should be set to `application/x-ndjson`.
  
  [[search-multi-search-api-path-params]]
  ==== {api-path-parms-title}
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=index]
  
  
  [[search-multi-search-api-request-body]]
  ==== {api-request-body-title}
  
  `aggregations`::
    (Optional, object) Specifies aggregations.
    
  include::{docdir}/rest-api/common-parms.asciidoc[tag=from]
    
  `max_concurrent_searches`::
    (Optional, integer) Specifies the maximum number of concurrent searches the 
    multi search API will execute. This default is based on the number of data 
    nodes and the default search thread pool size.
    
  `max_concurrent_shard_requests`::
    (Optional, integer) Specifies the maximum number of concurrent shard requests 
    that each sub search request will execute per node. This parameter should be 
    used to protect a single request from overloading a cluster (for example a 
    default request will hit all indices in a cluster which could cause shard 
    request rejections if the number of shards per node is high). Defaults to `5`. 
    In certain scenarios parallelism isn't achieved through concurrent request 
    such that this protection will result in poor performance. For instance in an 
    environment where only a very low number of concurrent search requests are 
    expected it might help to increase this value to a higher number.
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=preference]
    
  `query`::
    (Optional, <<query-dsl,query object>>) Defines the search definition using the 
    <<query-dsl,Query DSL>>.
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=routing]
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=search_type]
  
  `size`:: 
    (Optional, integer) The number of hits to return. Defaults to `10`.
  
  
  [[search-multi-search-api-response-body]]
  ==== {api-response-body-title}
  
  `responses`::
    (array) Includes the search response and status code for each search request 
    matching its order in the original multi search request. If there was a  
    complete failure for a specific search request, an object with `error` message 
    and corresponding status code will be returned in place of the actual search 
    response.
  
  
  [[search-multi-search-api-example]]
  ==== {api-examples-title}
  
  The header part includes which index / indices to search on, the `search_type`, 
  `preference`, and `routing`. The body includes the typical search body request 
  (including the `query`, `aggregations`, `from`, `size`, and so on).
  
  [source,js]
  --------------------------------------------------
  