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 [5.1.0] Added in 5.1.0.

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 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.