Get the search shards

  • POST also GET /{index}/_search_shards
  • POST also GET /_search_shards

Get the indices and shards that a search request would be run against. This information can be useful 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.

If the Elasticsearch security features are enabled, you must have the view_index_metadata or manage index privilege for the target data stream, index, or alias.

  • Index privileges: view_index_metadata

Path Parameters

index union IndexName | [] IndexName optional

A comma-separated list of data streams, indices, and aliases to search. It supports wildcards (*). To search all data streams and indices, omit this parameter or use * or _all.

Leave it out to use /_search_shards.

Response