# Error when creating a index template for a Time Serie

**URL:** <https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002>\
**Category:** Elasticsearch\
**Created:** [September 27, 2023, 3:22pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002 "2023-09-27T15:22:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mubolio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mubolio/32/121792_2.png) [@Mubolio](https://discuss.elastic.co/u/Mubolio)\
**Post date:** [September 27, 2023, 3:22pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/1 "2023-09-27T15:22:20Z")

</div>

Hello,

I'm trying to use a timeserie datastream, for that I try to create an index template, note that  
the bellow example it is almost the same as the one in the documentation:

> **[Time series data stream (TSDS) | Elasticsearch Guide \[8.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.10/tsds.html)**

```auto
PUT _index_template/my-weather-sensor-index-template
{
  "index_patterns": ["metrics-weather_sensors-*"],
  "data_stream": { },
  "template": {
    "settings": {
      "index.mode": "time_series"
    }
  },
  "priority": 500,
  "_meta": {
    "description": "Template for my weather sensor data"
  }
}

```

But I get an error:

```auto
{
  "error" : {
    "root_cause" : [
      {
        "type" : "invalid_index_template_exception",
        "reason" : "index_template [my-weather-sensor-index-template] invalid, cause [Validation Failed: 1: unknown setting [index.mode] did you mean [index.codec]?;]"
      }
    ],
    "type" : "invalid_index_template_exception",
    "reason" : "index_template [my-weather-sensor-index-template] invalid, cause [Validation Failed: 1: unknown setting [index.mode] did you mean [index.codec]?;]"
  },
  "status" : 400
}

```

I don't understand why, I would appreacite any idea/help.

Thanks.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 27, 2023, 3:26pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/2 "2023-09-27T15:26:26Z")

</div>

What version of Elasticsearch are you using?

---

<div class="post-metadata">

**Author:** ![Mubolio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mubolio/32/121792_2.png) [@Mubolio](https://discuss.elastic.co/u/Mubolio)\
**Post date:** [September 27, 2023, 3:28pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/3 "2023-09-27T15:28:18Z")

</div>

thanks, mmm I see 7.16.1 and that looks that is the reason

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 27, 2023, 3:31pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/4 "2023-09-27T15:31:02Z")

</div>

Yeah, TSDS started on version 8.5.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 27, 2023, 3:40pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/6 "2023-09-27T15:40:11Z")

</div>

> [@Mubolio](#):
>
> Not 8.1? Since the documentation is for that version.

The documentation you shared is for version 8.10, not 8.1.

In the Elastic documentation site you can change on the left side to look at the documentation for a specific version, if you change it between version 8 minor releases you will see that the page only exists from version 8.5

Since you are on version 7.16, you would need to upgrade to version 7.17 and then you could upgrade to version 8.10.

---

<div class="post-metadata">

**Author:** ![Mubolio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mubolio/32/121792_2.png) [@Mubolio](https://discuss.elastic.co/u/Mubolio)\
**Post date:** [September 27, 2023, 3:43pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/7 "2023-09-27T15:43:31Z")

</div>

Sorry that was a typo, I see it here the feature was released in that version, thanks.

> **[Elasticsearch version 8.5.0 | Elasticsearch Guide \[8.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/release-notes-8.5.0.html)**

---

<div class="post-metadata">

**Author:** ![Mubolio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mubolio/32/121792_2.png) [@Mubolio](https://discuss.elastic.co/u/Mubolio)\
**Post date:** [September 28, 2023, 8:41am UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/8 "2023-09-28T08:41:03Z")

</div>

I have few other doubts: I see that the documentation examples of TSDS use a policy that enables searchable snapshoots, are they required to reach the mentioned 70% compression ? Are they necessary for using TSDS?

Regards.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [September 28, 2023, 12:09pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/9 "2023-09-28T12:09:30Z")

</div>

> [@Mubolio](#):
>
> I see that the documentation examples of TSDS use a policy that enables searchable snapshoots, are they required to reach the mentioned 70% compression ? Are they necessary for using TSDS?

I'm not sure I do not use TSDS nor have plan to use it, and Searchable Snapshots are only available with a paid Enterprise License, which I also do not have.

But you do not need to have searchable snapshots to use TSDS and the mentioned compression is also not related to it, basically all policies will have a searchable snapshot phase.

---

<div class="post-metadata">

**Author:** ![Mubolio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mubolio/32/121792_2.png) [@Mubolio](https://discuss.elastic.co/u/Mubolio)\
**Post date:** [September 28, 2023, 4:06pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/10 "2023-09-28T16:06:33Z")

</div>

OK, in the documentation it is not mentioned that searchable snapshoots are required, on the other side I see having the policies does not require to have a searchable snapshoot phase but would be logical to have it.

Also I never have used them, I'll go for the version update.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 26, 2023, 4:06pm UTC](https://discuss.elastic.co/t/error-when-creating-a-index-template-for-a-time-serie/344002/11 "2023-10-26T16:06:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
