Skip to content

Commit 482034e

Browse files
authored
Fix index template step in Set up a TSDS (#3945)
Fixes #3914 - Move lifecycle object to the right place in the example - Clarify intro text
1 parent b6e0a3d commit 482034e

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

manage-data/data-store/data-streams/set-up-tsds.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ PUT _ilm/policy/my-weather-sensor-lifecycle-policy
6363
}
6464
}
6565
// Additional phases (warm, cold, delete) as needed
66-
}
6766
}
6867
}
6968
}
@@ -85,10 +84,10 @@ The structure of a time series data stream is defined by an index template. Crea
8584
- To define dimensions dynamically, you can use a pass-through object. For details, refer to [Defining sub-fields as time series dimensions](elasticsearch://reference/elasticsearch/mapping-reference/passthrough.md#passthrough-dimensions).
8685
- **Metrics:** To define a metric, use the `time_series_metric` mapping parameter. For details, refer to [Metrics](/manage-data/data-store/data-streams/time-series-data-stream-tsds.md#time-series-metric).
8786
- **Timestamp** (optional): Define a `date` or `date_nanos` mapping for the `@timestamp` field. If you don't specify a mapping, {{es}} maps `@timestamp` as a `date` field with default options.
88-
- {applies_to}`serverless: unavailable` {applies_to}`stack: ga` **Lifecycle management**: For {{stack}}, include lifecycle settings to enable automatic rollover and prevent indices from growing too large.
89-
- Set `"lifecycle": { "enabled": true }`.
90-
- If you created an ILM policy in [step 1](#tsds-ilm-policy), reference it with `index.lifecycle.name`.
91-
- **Other settings** (optional): Additional index settings, such as [`index.number_of_replicas`](elasticsearch://reference/elasticsearch/index-settings/index-modules.md#dynamic-index-number-of-replicas), for the data stream's backing indices.
87+
- {applies_to}`serverless: unavailable` {applies_to}`stack: ga` **Lifecycle management**: If you're using {{stack}}, define a lifecycle to enable automatic rollover and prevent indices from growing too large.
88+
- Add a `lifecycle` object and specify `"enabled": true`.
89+
- If you created an ILM policy in [step 1](#tsds-ilm-policy), reference it in the settings with `index.lifecycle.name`.
90+
- **Settings** (optional): Define any relevant index settings, such as [`index.number_of_replicas`](elasticsearch://reference/elasticsearch/index-settings/index-modules.md#dynamic-index-number-of-replicas), for the data stream's backing indices.
9291
- **Priority:** Set the priority higher than `200` to avoid [collisions](/manage-data/data-store/templates.md#avoid-index-pattern-collisions) with built-in templates.
9392

9493
**Example index template PUT request:**
@@ -101,10 +100,10 @@ PUT _index_template/my-weather-sensor-index-template
101100
"template": {
102101
"settings": {
103102
"index.mode": "time_series",
104-
"index.lifecycle.name": "my-lifecycle-policy", <1>
105-
"lifecycle": {
106-
"enabled": true <2>
107-
}
103+
"index.lifecycle.name": "my-lifecycle-policy" <1>
104+
},
105+
"lifecycle": {
106+
"enabled": true <2>
108107
},
109108
"mappings": {
110109
"properties": {

0 commit comments

Comments
 (0)