Why match_all is slower than range filter?

ES 1.5.2
Here's the queries, from slowest to faster (I ran all of them multiple times):

"query":{"match_all": {}}
~200ms

{
    "query": {
        "filtered": {
           "filter": {
               "range": {
                  "indexedDateTime": {
                     "from": "2014-01-01"
                  }
               }
           }
        }
    }
}

~150ms

{
    "query": {
        "filtered": {
           "filter": {
               "range": {
                  "indexedDateTime": {
                     "from": "2016-01-01"
                  }
               }
           }
        }
    }
}

~20ms

The average response time correlates with total numbers of document returned and I don't quite understand why, since I'm asking for no documents (the times will be the same if add size: 0). I thought match_all should be fastest of all since elastic shouldn't do any work, and range filter time should only depend on total number of documents in index, since it uses either fielddata or inverted index, so it shouldn't care for number of matching documents.

What am I missing here?

Upgrade to 2.x.

You will notice the difference :slight_smile:

Yeah, we've been thinking of it for some time. Not a trivial thing to do.

Still interested in explanation of this version behavior.