A newer version is available. For the latest information, see the
current release documentation.
Force merge
editForce merge
editPhases allowed: hot, warm.
Force merges the index into the specified maximum number of segments. This action makes the index read-only.
The forcemerge
action is best effort. It might happen that some of the
shards are relocating, in which case they will not be merged.
To use the forcemerge
action in the hot
phase, the rollover
action must be present.
If no rollover action is configured, ILM will reject the policy.
Options
edit-
max_num_segments
-
(Required, integer)
Number of segments to merge to. To fully merge the index, set to
1
. -
index_codec
-
(Optional, string) Codec used to compress the document store. The only accepted value is
best_compression
, which uses DEFLATE for a higher compression ratio but slower stored fields performance. To use the default LZ4 codec, omit this argument.
Example
editPUT _ilm/policy/my_policy { "policy": { "phases": { "warm": { "actions": { "forcemerge" : { "max_num_segments": 1 } } } } } }