title: Elasticsearch : How to delete an Index using python
body: <p>Forgive me if this is quite basic but I have Python 2.7 and Elasticsearch 2.1.1 and I am just trying to delete an index using </p>
  
  <pre><code>es.delete(index='researchtest', doc_type='test')
  </code></pre>
  
  <p>but this gives me </p>
  
  <pre><code>return func(*args, params=params, **kwargs)
  TypeError: delete() takes at least 4 arguments (4 given)
  </code></pre>
  
  <p>I also tried </p>
  
  <pre><code>es.delete_by_query(index='researchtest', doc_type='test',body='{"query":{"match_all":{}}}')
  </code></pre>
  
  <p>but I get</p>
  
  <pre><code>AttributeError: 'Elasticsearch' object has no attribute 'delete_by_query'
  </code></pre>
  
  <p>Any idea why? Has the api changed for 2.1.1 for python? </p>
  
  <p><a href="https://elasticsearch-py.readthedocs.org/en/master/api.html#elasticsearch.client.IndicesClient.delete" rel="noreferrer">https://elasticsearch-py.readthedocs.org/en/master/api.html#elasticsearch.client.IndicesClient.delete</a></p>