You did everything right. You executed your query with explain , and Elasticsearch showed you a detailed implementation plan in explanations .
However, the detailed implementation plan here does not seem to have any details; this is because you did not run the query at all. You only executed post_filter (the very first keyword in your example.)
Since you did not specify a query at all, Elasticsearch matches every document in your index and applies a constant account for all of them. That's why in explanations you see: "explanation": "ConstantScore(*:*)"
Since each document in your index has been mapped, the post_filter you post_filter applies to each of them. This in itself is already slow; to make it worse, mail filters are never cached. ( https://www.elastic.co/guide/en/elasticsearch/guide/current/_post_filter.html ) This way, explain will never tell you any filter or cache file for your example, even if it could.
So, to answer your question: explain has already returned the best detailed execution plan that Elasticsearch could offer, given your specific example. You can try a regular filter instead of post_filter to give Elasticsearch a chance to create caches and improve performance.
source share