浏览代码

Make force merge warning more precise (#90151)

We tell users not to force merge unless their index is read-only. This PR
proposes to soften the warning and make it more precise. This way, more users
can consider force merging for their use case, like those with append-only
indices, or those with a small number of updates that can regularly perform a
force merge.
Julie Tibshirani 3 年之前
父节点
当前提交
9f0f02d232
共有 1 个文件被更改,包括 10 次插入7 次删除
  1. 10 7
      docs/reference/indices/forcemerge.asciidoc

+ 10 - 7
docs/reference/indices/forcemerge.asciidoc

@@ -39,13 +39,16 @@ deleted documents. Merging normally happens automatically, but sometimes it is
 useful to trigger a merge manually.
 
 // tag::force-merge-read-only-warn[]
-WARNING: **Force merge should only be called against an index after you have
-finished writing to it.** Force merge can cause very large (>5GB) segments to
-be produced, and if you continue to write to such an index then the automatic
-merge policy will never consider these segments for future merges until they
-mostly consist of deleted documents. This can cause very large segments to
-remain in the index which can result in increased disk usage and worse search
-performance.
+WARNING: **We recommend only force merging a read-only index (meaning the index
+is no longer receiving writes).**  When documents are updated or deleted, the
+old version is not immediately removed, but instead soft-deleted and marked
+with a "tombstone". These soft-deleted documents are automatically cleaned up
+during regular segment merges. But force merge can cause very large (> 5GB)
+segments to be produced, which are not eligible for regular merges. So the
+number of soft-deleted documents can then grow rapidly, resulting in higher
+disk usage and worse search performance. If you regularly force merge an index
+receiving writes, this can also make snapshots more expensive, since the new
+documents can't be backed up incrementally.
 // end::force-merge-read-only-warn[]