原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/ilm-forcemerge.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/ilm-forcemerge.html
本地英文版地址: ../en/ilm-forcemerge.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Force mergeedit
Phases allowed: hot, warm.
Force merges the index into the specified maximum number of segments.
This action makes the index read-only.
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.
Optionsedit
-
max_num_segments
-
(Required, integer)
Number of segments to merge to. To fully merge the index, set to
1
. -
codec
-
(Optional, string) Use the
best_compression
codec. Valid values:best_compression
.
Exampleedit
PUT _ilm/policy/my_policy { "policy": { "phases": { "warm": { "actions": { "forcemerge" : { "max_num_segments": 1 } } } } } }