title: How to delete all data from an index using delete_ by_query plugin with ES 2.X versions in rails app?
body: <p>I have upgraded my <code>elasticsearch</code> to <code>2.0 version</code> in my <code>rails 4.2.7</code> app and am trying to delete all index data using <a href="https://www.elastic.co/guide/en/elasticsearch/plugins/2.3/plugins-delete-by-query.html#plugins-delete-by-query" rel="nofollow noreferrer">delete-by-query</a> plugin. How can i achieve this? <br>
  i was using delete_by_query method like this </p>
  
  <pre><code>Elasticsearch::Model.client
                      .delete_by_query(index: index_klass.index_name,
                                       body: {query: {match_all: {}}})
  </code></pre>
  
  <p>But this is deprecated in ES 2.X versions. so how can i use plugin to do this. thanks in advance. </p>