I know how to delete an entire ElasticSearch index, but how do you purge all documents from an index?
My Motivation: I\'d like to have a \"ReIndex\" method that purg
You can use a delete by query. This will delete all documents that match * i.e. everything.
curl -XDELETE localhost:9200//_query?q=*
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
Don't forget to optimize afterwards.
curl localhost:9200//_optimize