Skip to content

[Internal]: "Set up a TSDS" contains invalid query #3914

@pquentin

Description

@pquentin

Description

See https://github.com/elastic/docs-content/blob/126dfecc5ce6f3392cfc032541a0506fd2672704/manage-data/data-store/data-streams/set-up-tsds.md

The page suggests that lifecycle.enabled is an index setting, whereas it is actually at the template level.

Current documented query (edited for brevity):

PUT _index_template/my-weather-sensor-index-template
{
  "template": {
    "settings": {
      "lifecycle": { 
        "enabled": true
      }
    }
  }
}

This fails with "reason": "index_template [my-weather-sensor-index-template] invalid, cause [Validation Failed: 1: unknown setting [index.lifecycle.enabled] did you mean [index.lifecycle.name]?;]".

Here's a correct query:

PUT _index_template/my-weather-sensor-index-template
{
  "template": {
    "lifecycle": { 
      "enabled": true
    }
  }
}

This text could also be clarified:

- {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.
- Set `"lifecycle": { "enabled": true }`.

Resources

N/A

Which documentation set does this change impact?

Elastic On-Prem and Cloud (all)

Feature differences

N/A

What release is this request related to?

N/A

Serverless release

N/A

Collaboration model

The documentation team

Point of contact.

Main contact: @pquentin

Stakeholders: @nielsbauman @masseyke

Metadata

Metadata

Assignees

Labels

Team:DeveloperIssues owned by the Developer Docs Team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions