explain_query
Validate query rewrites, profile component timing, and per-document scoring to identify invalid or slow clauses in Elasticsearch queries.
Instructions
Explain a query three ways: (1) _validate/query?rewrite=true shows how ES rewrites it and why it may be invalid, (2) profile=true gives per-component timing to find the slow clause, (3) if doc_id is given, _explain shows why that document matched or did not, with scoring detail.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| query | Yes | ||
| doc_id | No | ||
| profile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |