Is querying for a specific docType inherently more performant?

Hi all,

What my question boils down to is this - is it more performant to:

  1. Search an index for all data matching a particular docType OR
  2. Query an entire index (with one doctype) and filter based on your own
    field. Say this field has the same number of values and approx. number of
    documents on each value as 1).

I know that docType is really just a special field in the final data...and
since each shard is a lucene index, it's still going to have to search
through the entire data set on that index at some point in time. My guess
would be that being able to search indices by docTypes at a high level are
mostly just for conceptualization purposes and wouldn't make these queries
any faster, but that it could be the case that ES performs some sort of
optimization on docType searching behind the scenes.


You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit