Does the order of filters matter in a query?

I have seen in various places that the declaration of the filters in a query matters for query performance? Is this true or does ES do optimization under the covers?