I am trying to delete a document from elastic search (using .Net NEST library), but a document is not deleted from a segment, just marked as deleted. (does not free the disk space.)
Could you please let us know how to delete a document from elastic search disk and in other words how to free the disk space.
Perform the delete and then run a force merge with max_num_segments set to 1 or the only_expunge_deletes parameter. Be aware that this is an expensive operation in terms of processing and disk I/O.
That is not what I recommended. Try POST /indexname/_forcemerge?max_num_segments=1&flush=true or POST /indexname/_forcemerge?only_expunge_deletes=true.
Be aware it is an expensive operation and can take some time to run.
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.