The official document says:
As already mentioned in Updating a Whole Document, deleting a document doesn’t immediately remove the document from disk; it just marks it as deleted. Elasticsearch will clean up deleted documents in the background as you continue to index more data.
and there is a merge scheduler task to merge data.
after delete doc says Deleting documents only flags these as deleted, so they would not be searched. To reclaim disk space, you have to optimize the index
But,i find when i delete
a document
,the disk space will not be released until i use force merge
api. Why?
If so,if i use delete-by-query
plugin,i will need to use force merge api
every time?
My elasticsearch's
version is 2.3.1
.