title: Proper way to filter a query with Elasticsearch? (filter vs filtered query)
body: <p>I am trying work out if there is a difference between "filters" and "filtered queries" in Elasticsearch.</p>
  
  <p>The two example requests below return the same results, when run against my index.</p>
  
  <p>Are they actually different in some subtle way?  </p>
  
  <p>Is there a reason why one would be preferred over the other, in different situations? </p>
  
  <p>DSL giving one top-level <code>query</code>, <strong>and</strong> one top-level <code>filter</code>:</p>
  
  <pre><code>GET /index/type/_search?_source
  {
    "query": {
      "multi_match": {
        "query": "my dog has fleas",
        "fields": ["name", "keywords"]
      }
    },
    "filter": {
      "term": {"status": 2}
    }
  }
  </code></pre>
  
  <p>DSL giving <strong>only</strong> a top-level <code>query</code>, using the <code>filtered</code> construct:</p>
  
  <pre><code>GET /index/type/_search?_source
  {
    "query": {
      "filtered": {
        "query": {
          "multi_match": {
            "query": "my dog has fleas",
            "fields": ["name", "keywords"]
          }
        },
        "filter": {
          "term": {"status": 2}
        }
      }
    }
  }
  </code></pre>