根据force merge文档:
Force merge should only be called against read-only indices. Running force merge against a read-write index can cause very large segments to be produced (>5Gb per segment), and the merge policy will never consider it for merging again until it mostly consists of deleted docs. This can cause very large segments to remain in the shards.
但是,我不确定是否可以在读写索引上使用 only_expunge_deletes
运行 forcemerge
。使用 only_expunge_deletes
选项生成非常大的段的风险是否仍然存在?如果是这样,当不手动调用 forcemerge
时,ES 通常如何回收空间?
最佳答案
正如引用的文档中提到的,forcemerge 应该只在只读索引上调用。
为了回答您的问题,ES constantly merges segments并在此过程中删除已删除的文档,因此您永远不必担心这一点。
您可以在 this great video 中想象这是如何发生的.
关于elasticsearch - 是否可以在读写索引上使用 only_expunge_deletes 强制合并?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55903641/