title: Elasticsearch - How to delete a list of documents?
body: <p>I have an array of _id.</p>
  
  <p>On <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/_retrieving_multiple_documents.html" rel="noreferrer">this page</a> I found out how to retrieve a list of documents from it :</p>
  
  <pre><code>GET ads/_mget
  {
     "ids": [ "586213440e7d2c7f10fe2574",
              "586213440e7d2c7f10fe2575",
              "586213450e7d2c7f10fe2576",
              "586213450e7d2c7f10fe2577" ]
  }
  </code></pre>
  
  <p>This works and returns a list of 4 full documents, as expected.</p>
  
  <p>(sidenote)
  I find it weird to have to write "ids" in the query, when it actually acts on the "_id" field.
  (end sidenote)</p>
  
  <p>Now I can't figure out how to DELETE these documents from the same _id list.</p>
  
  <p>I tried <code>DELETE ads/_mget</code> but I get an error : <code>No handler found for uri [/ads/_mget] and method [DELETE]</code></p>
  
  <p>I tried <code>_mdelete</code> instead of <code>_mget</code> but it doesn't seem to exist.</p>
  
  <p>I also tried</p>
  
  <pre><code>DELETE ads
  {
     "ids": [ "586213440e7d2c7f10fe2574",
              "586213440e7d2c7f10fe2575",
              "586213450e7d2c7f10fe2576",
              "586213450e7d2c7f10fe2577" ]
  }
  </code></pre>
  
  <p>...but this... just deletes EVERYTHING and I have to reindex the database.</p>