cluster.allocationExplain

edit
client.cluster.allocationExplain({
  include_yes_decisions: boolean,
  include_disk_info: boolean,
  body: object
})

Reference

include_yes_decisions or includeYesDecisions

boolean - Return YES decisions in explanation (default: false)

include_disk_info or includeDiskInfo

boolean - Return information about disk usage and shard sizes (default: false)

body

object - The index, shard, and primary flag to explain. Empty means explain the first unassigned shard