Fastest way to delete specific indexes

I am trying to delete specific index with below lines of code using groovy and grails
finalIndexName.each {
// DeleteIndexResponse deleteResponse = client.admin().indices().delete(new DeleteIndexRequest(it)).actionGet() // taking 40-60 seconds
// deleteResult=client.admin().indices().delete(new DeleteIndexRequest(it)).actionGet(); // 40-60 seconds
deleteResult=client.admin().indices().prepareDelete(it).get(); // 20-30 seconds

but both are take minimum 40 seconds for 25 index.

please help me to bulk delete in less time

Have you tried using cURL ?

i am using grails and groovy. how do i convert curl to my code

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.