title: Different between query and filters in ElasticSearch
body: <p>I am a little bit confused about the differences between queries and filters. My confusion stems from the following sentences that I read in the documentation.</p>
  
  <ol>
  <li>Filters are recommended over queries because filters do not trigger score computation.</li>
  <li>Filters should be used only when the response is a yes/no or an exact search.</li>
  <li>Filters can have queries called 'query filters' (like 'term filter', etc.)</li>
  </ol>
  
  <p>All I want to is filter by 4 attribute values, put in a date range and sum (aggregate) over a few fields. Like so</p>
  
  <pre><code>sum (salary, tenure) where name = A AND age = B AND join_date between X and Y 
  </code></pre>