Proper method for deleting an index

I am deleting old indices using a cronjob:

1 0 * * * find /data/elasticsearch/db/vault_elasticsearch/nodes/0/indices
-type d -name 'logstash*' -mtime +15 -exec basename {} ; | xargs -I INDEX
curl -XDELETE 'http://localhost:9200/INDEX/'

This is causing problems in elasticsearch. It's having trouble determining
whether or not the index is valid. Eventually, the ES process crashes.
There could be other factors causing this, but for the purposes of this
post, I only need to verify that I am deleting the index properly.

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Deleting an index via the delete index api, is the right way to delete an
index. What kind error en problems are you encountering?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.