Fastest way to delete specific indexes


(NGK) #1

Hi,
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


(Mujtaba Hussain) #2

Have you tried using cURL ?


(NGK) #3

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


(system) #4

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