@@ -55,6 +55,13 @@ snapshot retention runs off the index lifecycle management (ILM) policies and is
5555(Required, string)
5656<<snapshots-register-repository,Repository>> used to store the snapshot.
5757
58+ `replicate_for`::
59+ (Optional, TimeValue)
60+ By default, searchable snapshot indices are mounted without replicas. Using this will
61+ result in a searchable snapshot index being mounted with a single replica for the time period
62+ specified, after which the replica will be removed. This option is only permitted on the
63+ first searchable snapshot action of a policy.
64+
5865`force_merge_index`::
5966(Optional, Boolean)
6067Force merges the managed index to one segment.
@@ -109,3 +116,44 @@ PUT _ilm/policy/my_policy
109116 }
110117}
111118--------------------------------------------------
119+
120+ [[ilm-searchable-snapshot-replicate-for-ex]]
121+ ===== Mount a searchable snapshot with replicas for fourteen days
122+
123+ This policy mounts a searchable snapshot in the hot phase with a
124+ single replica and maintains that replica for fourteen days. After
125+ that time has elapsed, the searchable snapshot index will remain (with
126+ no replicas) for another fourteen days, at which point it will proceed
127+ into the delete phase and will be deleted.
128+
129+ [source,console]
130+ --------------------------------------------------
131+ PUT _ilm/policy/my_policy
132+ {
133+ "policy": {
134+ "phases": {
135+ "hot": {
136+ "actions": {
137+ "rollover" : {
138+ "max_primary_shard_size": "50gb"
139+ },
140+ "searchable_snapshot" : {
141+ "snapshot_repository" : "backing_repo",
142+ "replicate_for": "14d"
143+ }
144+ }
145+ },
146+ "delete": {
147+ "min_age": "28d",
148+ "actions": {
149+ "delete" : { }
150+ }
151+ }
152+ }
153+ }
154+ }
155+ --------------------------------------------------
156+
157+ [NOTE]
158+ If the `replicate_for` option is specified, its value must be
159+ less than the minimum age of the next phase in the policy.
0 commit comments