Three things can be explained in elasticsearch:
Explain for each hit how its score was computed (Docs: Explain)
GET <index>/<type>/_search?explain
{
"query": {
...
}
}
or
GET <index>/<type>/_search
{
"explain": true,
"query": {
...
}
}
Explain how a query will be executed (Docs: Validating Queries)
GET <index>/<type>/_validate/query?explain
{
"query": {
...
}
}
Explain why a certain document matches or doesn't match a query (Docs: Explain API)
GET <index>/<type>/<id>/_explain
{
"query": {
...
}
}