Browse Source

[DOCS] Add force merge disclaimer to tuning guide (#68491)

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Pius 4 years ago
parent
commit
399e11b7e7

+ 2 - 0
docs/reference/how-to/disk-usage.asciidoc

@@ -149,6 +149,8 @@ Indices in Elasticsearch are stored in one or more shards. Each shard is a Lucen
 
 The <<indices-forcemerge,`_forcemerge` API>> can be used to reduce the number of segments per shard. In many cases, the number of segments can be reduced to one per shard by setting `max_num_segments=1`.
 
+include::{es-repo-dir}/indices/forcemerge.asciidoc[tag=force-merge-read-only-warn]
+
 [discrete]
 === Shrink Index
 

+ 2 - 0
docs/reference/indices/forcemerge.asciidoc

@@ -38,6 +38,7 @@ shard by merging some of them together, and also frees up the space used by
 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
@@ -45,6 +46,7 @@ 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.
+// end::force-merge-read-only-warn[]
 
 
 [[forcemerge-blocks]]