🖥️

Explain Allocation

Verified

@elastic/explain-allocation

Explain why a shard is assigned or unassigned

Usage

RUN SKILL explain_allocation()

With parameters:

RUN SKILL explain_allocation WITH index = 'value'

Parameters

NameTypeDefaultDescription
indexSTRINGIndex name

Returns

DOCUMENT— A single document object

Example

-- Using curl
curl -u elastic-admin:elastic-password http://localhost:9200/_escript \
  -H "Content-Type: application/json" \
  -d '{"query": "RUN SKILL explain_allocation()"}'

-- Response
{
  "result": [...],
  "_meta": {
    "execution_id": "abc123",
    "duration_ms": 45
  }
}