Skip to content

Instantly share code, notes, and snippets.

@AndreKR
Last active December 11, 2015 00:36
Show Gist options
  • Save AndreKR/c2b29ea446080eed2722 to your computer and use it in GitHub Desktop.
Save AndreKR/c2b29ea446080eed2722 to your computer and use it in GitHub Desktop.
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