Does the order of filters matter?

Hello,

I have a query like this one :

     query:
       filter:
         bool:
             must:
                 - range:
                     from date to date
                 - bool:
                     - should:
                         - term
                         - term
                 - bool:
                     - should:
                         - term
                         - term
                         - ****

I don't understand how filters are performed.
If the last bool filter is the most restrictive, should I place it in first position ?

ES applies logic to reformat queries to be as optimal as it can be. It shouldn't matter too much, as long as you are running a modern release (the newer the better!).

Ok thanks for your answer

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.