Skip to content

Commit e913f6c

Browse files
committed
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.
1 parent 3fadc11 commit e913f6c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/reference/indices/forcemerge.asciidoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,16 @@ deleted documents. Merging normally happens automatically, but sometimes it is
3939
useful to trigger a merge manually.
4040

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

5154

0 commit comments

Comments
 (0)