I am using ES 5.5.1 which is running in CentOS on virtual box , where i deleted several indices with huge data but even after deletion am not able to get back the space allocated by them . I got to know that deletion only attaches a DELETE tag to the indices and hence i tried the below cmd as well to free up space :
When you delete documents from an index they are only marked as 'deleted' and won't show up in searches but the disc space won't get reclaimed until a subsequent segment merger, which you can trigger with the _forcemerge command that you listed.
However, if you want to get rid of the entire index it's much better just to run:
I tried _forcemerge command , but it doesnt help .
Also, i had deleted the indices using _head plugin UI and hence dont have the list of the indices that i deleted previously and sounable to use the explicit XDELETE curl .
I haven't used that plugin myself but from what you wrote earlier, about the disc space not getting reclaimed, it sounds as if no index was actually deleted and that they still exist (though all documents in them may have been marked as deleted).
You can verify if an index still exists by running this curl command
By default, a setting called index.merge.policy.expunge_deletes_allowed sets the the percentage of deleted documents at which the deletion happens. By default, this is set at 10%, so as long as your deleted documents don't amount to 10% of your index, the space won't be reclaimed.
And only_expunge_deletes won't override the above setting.
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.