anchor.diff:  // TESTRESPONSE[s/0TvkCyF7TAmM1wHP4a42-A/$body.shards.1.0.allocation_id.id/]
   // TESTRESPONSE[s/fMju3hd1QHWmWrIgFnI4Ww/$body.shards.0.0.allocation_id.id/]
   
  -This time the search will only be executed against two of the shards, because
  -routing values have been specified.
  -
  -[float]
  -==== All parameters:
  -
  -[horizontal]
  -`routing`::
  -    A comma-separated list of routing values to take into account when
  -    determining which shards a request would be executed against.
  -
  -`preference`::
  -    Controls a `preference` of which shard replicas to execute the search
  -    request on. By default, the operation is randomized between the shard
  -    replicas. See the link:search-request-body.html#request-body-search-preference[preference]
  -    documentation for a list of all acceptable values.
  -
  -`local`::
  -    A boolean value whether to read the cluster state locally in order to
  -    determine where shards are allocated instead of using the Master node's
  -    cluster state.+The search will only be executed against two of the shards, because outing 
  +values have been specified.
  
positive.code: // TESTRESPONSE[s/bU_KLGJISbW0RejwnwDPKw/$body.shards.3.0.allocation_id.id/]
  // TESTRESPONSE[s/DMs7_giNSwmdqVukF7UydA/$body.shards.4.0.allocation_id.id/]
  
  And specifying the same request, this time with a routing value:
  
  [source,js]
  --------------------------------------------------
  
negative.code: // CONSOLE
  // TEST[s/^/PUT twitter\n{"settings":{"index.number_of_shards":5}}\n/]
  
  
  [[search-shards-api-request]]
  ==== {api-request-title}
  
  `GET /<index>/_search_shards`
  
  
  [[search-shards-api-desc]]
  ==== {api-description-title}
  
  The search shards api returns the indices and shards that a search request would
  be executed against. This can give useful feedback for working out issues or
  planning optimizations with routing and shard preferences. When filtered aliases
  are used, the filter is returned as part of the `indices` section.
  
  
  [[search-shards-api-path-params]]
  ==== {api-path-parms-title}
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=index]
  
  
  [[search-shards-api-query-params]]
  ==== {api-query-parms-title}
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  +
  --
  Defaults to `open`.
  --
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=preference]
  
  include::{docdir}/rest-api/common-parms.asciidoc[tag=routing]
  
  
  [[search-shards-api-example]]
  ==== {api-examples-title}
  
  [source,js]
  --------------------------------------------------
  GET /twitter/_search_shards
  --------------------------------------------------
  // CONSOLE
  // TEST[s/^/PUT twitter\n{"settings":{"index.number_of_shards":5}}\n/]
  
  The API returns the following result:
  
  [source,js]
  --------------------------------------------------
  