title: Deleting data in ElasticSearch
body: <p>I want to delete data in ElasticSearch that matches query. Im using ElasticSeach 1.5 and Im doing this query to achieve this:</p>
  
  <pre><code>POST employee/report/_delete_by_query
  {
     "query": {
        "bool": {
           "must": [
             [                 
                     { "match_phrase" : { "year_month" : "2016-8" }  },
                     { "term" : { "status" : "Inactive" }  }
              ]
           ]
        }
     }
  }
  </code></pre>
  
  <p>And when I do this, I get this result:</p>
  
  <pre><code>{
     "_index": "employee",
     "_type": "report",
     "_id": "_delete_by_query",
     "_version": 6,
     "created": false
  }
  </code></pre>
  
  <p>Every time I run the query, the _version numbers gets +1.
  Then I query the terms deleted, to check that there're no more results:</p>
  
  <pre><code>GET employee/report/_search
  {
     "query": {
        "bool": {
           "must": [
             [                 
                     { "match_phrase" : { "year_month" : "2016-8" }  },
                     { "term" : { "status" : "Inactive" }  }
              ]
           ]
        }
     }
  }
  </code></pre>
  
  <p>And Im still getting results! What Im doing wrong? Do I need to refresh ElasticSearch? Im missing some step?</p>