Skip to content

Commit bece477

Browse files
committed
Clarify scope and procedure for 'Configure a lifecycle policy'
1 parent 89c3405 commit bece477

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

manage-data/lifecycle/index-lifecycle-management/configure-lifecycle-policy.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,23 @@ products:
1010

1111
# Configure a lifecycle policy [set-up-lifecycle-policy]
1212

13-
An [{{ilm}}](/manage-data/lifecycle/index-lifecycle-management.md) ({{ilm-init}}) policy defines how your indices are managed over time, automating when and how they transition as they age.
13+
An [{{ilm}}](/manage-data/lifecycle/index-lifecycle-management.md) ({{ilm-init}}) policy defines how your indices are managed over time, automating when and how they transition as they age. You can use {{ilm-init}} to manage both data streams and standalone indices. When used with the latter, some additional configuration is required compared to the more automated process for data streams. This page describes the steps to configure an {{ilm-init}} lifecycle policy for both scenarios.
14+
15+
:::{note}
16+
This page is specifically about using {{ilm-init}} with indices or data streams. If you're looking for a simpler, less feature-rich lifecycle management option for data streams only, refer to [Data stream lifecycle](/manage-data/lifecycle/data-stream.md). Check [Data lifecycle](/manage-data/lifecycle.md) to compare these lifecycle management options.
17+
:::
18+
1419

1520
**Consider these aspects when configuring an {{ilm-init}} policy:**
1621

17-
* For {{ilm-init}} to manage an index, you need to specify a valid policy in the `index.lifecycle.name` index setting.
22+
* For {{ilm-init}} to manage an index or data stream, you need to specify a valid policy in the `index.lifecycle.name` index setting.
1823

19-
* To configure a lifecycle policy for [rolling indices](rollover.md) or data streams, you create the policy and add it to the [index template](../../data-store/templates.md).
24+
* To configure a lifecycle policy for [rolling indices](rollover.md) or data streams, you create the policy and add it to the [index template](../../data-store/templates.md). Data streams are generally recommended in favor of rolling indices due to the lesser amount of manual configuration required. When you use {{ilm-init}} with rolling indices, you need to perform the additional steps of creating an initial managed index (ensuring that it is named appropriately) and assigning an alias to it, as described in [Step 3](#create-initial-index) on this page.
2025

2126
* To use a policy to manage a single index, you can specify a lifecycle policy when you create the index, or apply a policy directly to an existing index.
2227

2328
* {{ilm-init}} policies are stored in the global cluster state and can be included in snapshots by setting `include_global_state` to `true` when you [take the snapshot](../../../deploy-manage/tools/snapshot-and-restore/create-snapshots.md). When the snapshot is restored, all of the policies in the global state are restored and any local policies with the same names are overwritten.
2429

25-
:::{note}
26-
This page is specifically about {{ilm-init}}. If you're looking for a simpler lifecycle management option for data streams, refer to [Data stream lifecycle](/manage-data/lifecycle/data-stream.md). Check [Data lifecycle](/manage-data/lifecycle.md) to compare these lifecycle management options.
27-
:::
28-
2930
## Overview [ilm-configure-overview]
3031

3132
To set up ILM to manage one or more indices, the general procedure is as follows:
@@ -35,7 +36,7 @@ To set up ILM to manage one or more indices, the general procedure is as follows
3536

3637
If you're configuring ILM for rolling indices and not using [data streams](../../data-store/data-streams.md), you additionally need to:
3738

38-
3. [Create an initial managed index](#create-initial-index)
39+
3. [Create an initial managed index and alias](#create-initial-index)
3940

4041
You can perform these actions in {{kib}} or using the {{es}} API.
4142

@@ -207,7 +208,7 @@ PUT _index_template/my_template
207208
:::
208209
::::
209210

210-
## Create an initial managed index [create-initial-index]
211+
## Create an initial managed index and alias [create-initial-index]
211212

212213
When you set up policies for your own rolling indices and are not using the recommended [data streams](../../data-store/data-streams.md), you must manually create the first index managed by a policy and designate it as the write index.
213214

@@ -250,7 +251,7 @@ Now you can start indexing data to the rollover alias specified in the lifecycle
250251
:sync: api
251252
Use the [Create an index API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create) to create the initial managed index.
252253

253-
The following request creates the `test-000001` index. Because it matches the index pattern specified in `my_template`, {{es}} automatically applies the settings from that template.
254+
The following request creates the `test-000001` index, with the alias `test-alias`. Because the index name matches the index pattern specified in `my_template`, {{es}} automatically applies the settings from that template.
254255

255256
```console
256257
PUT test-000001

0 commit comments

Comments
 (0)