I use delete by query command to delete old data. And I have already look the document and it said that the deleted data is actualy dosen't delete, just tag this data will be delete, and the segment merge will run background, and delete the data be taged. But I delete the old data several days ago, and today I find that the data is not deleted at all.
I already run this command:
PUT /_cluster/settings
{
"persistent" : {
"indices.store.throttle.max_bytes_per_sec" : "100mb"
}
}
the "deleted" means the data need to be delete. after I run /_forcemerge?max_num_segments=1 command, the "deleted" will be 0, and means the data is really be deleted.
When you delete a document in Elasticsearch, it is actually an update that creates a tombstone record, and this is reflected as a deleted document in the stats. You will however no longer be able to retrieve this document. Space is however not reclaimed until the immutable segments holding the deleted records are merged. This happens periodically or when you do a force merge down to 1 segment, which leaves no more tombstone records in the segments and the deleted count therefore drops to 0.
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.