Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Elasticsearch notes

Elasticsearch notes

Things named "explain"

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": {
		...
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment