Debugging Query via logging / execution plan


I was wondering whether Elasticsearch has a feature which enables debug logging per specific query, such you can tell what the node is doing only for a specific query.

Also on that topic - is there a way to know the query execution plan? Something like:

  • Splitting this query into those nodes, with this partial query - this took y seconds.
  • Per each query on node: the exact graph of operations:
    ** Fielddata cache used? No because ..., or Yes.
    ** Docvalue used? Yes, timing...?



We added the query profiler in version 2.2.0. See .

It prints out lot of information about the different phases of a search request.


This is a fantastic API in did.
Still there are many decision taken by the coordinator node or the data
node which doesn't get logged. I wrote some examples above. Here's one:

  • Was field filter cache used? Why not?
  • Was the shard query cache used? why not?
    Think of it as a tracing bullet through the query execution

I've moved the discussion into an issue since I think it's a valid feature request: