diff --git a/docs/reference/data-streams/change-mappings-and-settings.asciidoc b/docs/reference/data-streams/change-mappings-and-settings.asciidoc index 7ddfa9c540f3d..9bbbc74f0e895 100644 --- a/docs/reference/data-streams/change-mappings-and-settings.asciidoc +++ b/docs/reference/data-streams/change-mappings-and-settings.asciidoc @@ -35,7 +35,7 @@ PUT /_ilm/policy/my-data-stream-policy "hot": { "actions": { "rollover": { - "max_size": "25GB" + "max_primary_shard_size": "25GB" } } }, diff --git a/docs/reference/data-streams/set-up-a-data-stream.asciidoc b/docs/reference/data-streams/set-up-a-data-stream.asciidoc index 12441a5539fff..f846b2e1ef24d 100644 --- a/docs/reference/data-streams/set-up-a-data-stream.asciidoc +++ b/docs/reference/data-streams/set-up-a-data-stream.asciidoc @@ -40,7 +40,7 @@ PUT /_ilm/policy/my-data-stream-policy "hot": { "actions": { "rollover": { - "max_size": "25GB" + "max_primary_shard_size": "25GB" } } }, diff --git a/docs/reference/ilm/actions/ilm-rollover.asciidoc b/docs/reference/ilm/actions/ilm-rollover.asciidoc index 813341f95133e..e7cf8470c4fa4 100644 --- a/docs/reference/ilm/actions/ilm-rollover.asciidoc +++ b/docs/reference/ilm/actions/ilm-rollover.asciidoc @@ -84,6 +84,29 @@ shard is a primary (`p`) or a replica (`r`). [[ilm-rollover-ex]] ==== Example +[[ilm-rollover-primar-shardsize-ex]] +===== Roll over based on largest primary shard size + +This example rolls the index over when its largest primary shard is at least 50 gigabytes. + +[source,console] +-------------------------------------------------- +PUT _ilm/policy/my_policy +{ + "policy": { + "phases": { + "hot": { + "actions": { + "rollover" : { + "max_primary_shard_size": "50GB" + } + } + } + } + } +} +-------------------------------------------------- + [[ilm-rollover-size-ex]] ===== Roll over based on index size diff --git a/docs/reference/ilm/ilm-tutorial.asciidoc b/docs/reference/ilm/ilm-tutorial.asciidoc index 7284e28e5e94c..79953d99b6926 100644 --- a/docs/reference/ilm/ilm-tutorial.asciidoc +++ b/docs/reference/ilm/ilm-tutorial.asciidoc @@ -51,7 +51,7 @@ and the actions to perform in each phase. A lifecycle can have up to five phases For example, you might define a `timeseries_policy` that has two phases: * A `hot` phase that defines a rollover action to specify that an index rolls over when it -reaches either a `max_size` of 50 gigabytes or a `max_age` of 30 days. +reaches either a `max_primary_shard_size` of 50 gigabytes or a `max_age` of 30 days. * A `delete` phase that sets `min_age` to remove the index 90 days after rollover. Note that this value is relative to the rollover time, not the index creation time. @@ -72,18 +72,18 @@ PUT _ilm/policy/timeseries_policy { "policy": { "phases": { - "hot": { <1> + "hot": { <1> "actions": { "rollover": { - "max_size": "50GB", <2> + "max_primary_shard_size": "50GB", <2> "max_age": "30d" } } }, "delete": { - "min_age": "90d", <3> + "min_age": "90d", <3> "actions": { - "delete": {} <4> + "delete": {} <4> } } } @@ -232,7 +232,7 @@ is met. "min_age": "0ms", "actions": { "rollover": { - "max_size": "50gb", + "max_primary_shard_size": "50gb", "max_age": "30d" } } diff --git a/docs/reference/ilm/set-up-lifecycle-policy.asciidoc b/docs/reference/ilm/set-up-lifecycle-policy.asciidoc index bfef64f624557..e911b28eda440 100644 --- a/docs/reference/ilm/set-up-lifecycle-policy.asciidoc +++ b/docs/reference/ilm/set-up-lifecycle-policy.asciidoc @@ -49,7 +49,7 @@ PUT _ilm/policy/my_policy "hot": { "actions": { "rollover": { - "max_size": "25GB" <1> + "max_primary_shard_size": "25GB" <1> } } }, diff --git a/docs/reference/indices/get-data-stream.asciidoc b/docs/reference/indices/get-data-stream.asciidoc index d9d69eb530bd7..aacaa0e4ecc58 100644 --- a/docs/reference/indices/get-data-stream.asciidoc +++ b/docs/reference/indices/get-data-stream.asciidoc @@ -18,7 +18,7 @@ PUT /_ilm/policy/my-lifecycle-policy "hot": { "actions": { "rollover": { - "max_size": "25GB" + "max_primary_shard_size": "25GB" } } }, diff --git a/x-pack/plugin/core/src/main/resources/ilm-history-ilm-policy.json b/x-pack/plugin/core/src/main/resources/ilm-history-ilm-policy.json index febae00bc3608..253b92aaf997a 100644 --- a/x-pack/plugin/core/src/main/resources/ilm-history-ilm-policy.json +++ b/x-pack/plugin/core/src/main/resources/ilm-history-ilm-policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50GB", + "max_primary_shard_size": "50gb", "max_age": "30d" } } diff --git a/x-pack/plugin/core/src/main/resources/logs-policy.json b/x-pack/plugin/core/src/main/resources/logs-policy.json index 936bfe6c0e2e3..0a1bd7ad3eeae 100644 --- a/x-pack/plugin/core/src/main/resources/logs-policy.json +++ b/x-pack/plugin/core/src/main/resources/logs-policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50gb", + "max_primary_shard_size": "50gb", "max_age": "30d" } } diff --git a/x-pack/plugin/core/src/main/resources/metrics-policy.json b/x-pack/plugin/core/src/main/resources/metrics-policy.json index 936bfe6c0e2e3..0a1bd7ad3eeae 100644 --- a/x-pack/plugin/core/src/main/resources/metrics-policy.json +++ b/x-pack/plugin/core/src/main/resources/metrics-policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50gb", + "max_primary_shard_size": "50gb", "max_age": "30d" } } diff --git a/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/size_based_ilm_policy.json b/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/size_based_ilm_policy.json index 09a8db4e1ee9d..8b836b01e9121 100644 --- a/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/size_based_ilm_policy.json +++ b/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/core/ml/size_based_ilm_policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50GB" + "max_primary_shard_size": "50gb" } } } diff --git a/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/deprecation/deprecation-indexing-ilm-policy.json b/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/deprecation/deprecation-indexing-ilm-policy.json index 936bfe6c0e2e3..0a1bd7ad3eeae 100644 --- a/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/deprecation/deprecation-indexing-ilm-policy.json +++ b/x-pack/plugin/core/src/main/resources/org/elasticsearch/xpack/deprecation/deprecation-indexing-ilm-policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50gb", + "max_primary_shard_size": "50gb", "max_age": "30d" } } diff --git a/x-pack/plugin/core/src/main/resources/slm-history-ilm-policy.json b/x-pack/plugin/core/src/main/resources/slm-history-ilm-policy.json index febae00bc3608..253b92aaf997a 100644 --- a/x-pack/plugin/core/src/main/resources/slm-history-ilm-policy.json +++ b/x-pack/plugin/core/src/main/resources/slm-history-ilm-policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50GB", + "max_primary_shard_size": "50gb", "max_age": "30d" } } diff --git a/x-pack/plugin/core/src/main/resources/synthetics-policy.json b/x-pack/plugin/core/src/main/resources/synthetics-policy.json index 936bfe6c0e2e3..0a1bd7ad3eeae 100644 --- a/x-pack/plugin/core/src/main/resources/synthetics-policy.json +++ b/x-pack/plugin/core/src/main/resources/synthetics-policy.json @@ -3,7 +3,7 @@ "hot": { "actions": { "rollover": { - "max_size": "50gb", + "max_primary_shard_size": "50gb", "max_age": "30d" } }