I am trying to delete index from elastic search using below code snippet. DeleteIndexResponse returns true, but the folder still exists in the physical location.
DeleteIndexResponse res= client.admin().indices().prepareDelete("dummyIndex").execute().actionGet();
System.out.println("Index deletion status : " + res.isAcknowledged());
ES no longer identifies it as index when i search from REST end point - error": "IndexMissingException[[dummyIndex] missing]"
But it is not deleted from disk. Is there something i missed here?
Iirc removing the index from disk is asynchronous from the ack for the
delete. Just that it is gone from the cluster state. Though I think that is
changing a bit in 5.0 but I don't have a link handy.
@nik9000
Index is getting deleted from file system as well when i run curl XDelete command from Rest Client, but when deleted using DeleteIndex java API, it is not removed from disk.
@dadoonet this is the output after deleting the index using the java, do you need the file structure before index deletion? Elastic search version :1.0.2
I'm asking to go into the workdummy\0\index, run a dir command so we can see if there are some files left.
BTW you are using a very old version of elasticsearch. Could you please run the same test on a new cleaned and fresh elasticsearch instance running latest 1.7?
Before deleting the index, do i have to call the closeIndex api- so as to remove references (if any) to the index?
Because before deletion, i am searching with scroll api on this index.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.