# Index template not getting applied to my index

**URL:** https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697
**Category:** Elasticsearch
**Created:** [June 3, 2024, 8:56am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697 "2024-06-03T08:56:59Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![vijay117](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@vijay117](https://discuss.elastic.co/u/vijay117)
#### Post date: [June 3, 2024, 8:56am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/1 "2024-06-03T08:56:59Z")

</div>

Hi Community,

I have created a new index template( for total\_field\_limit) using Kibana console, but it is not getting applied with my index. I have deleted my index and then ran the code so that the index will pick the template but its not. Please help

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 3, 2024, 9:17am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/2 "2024-06-03T09:17:32Z")

</div>

Please share the template and the command you use to create the index. It is also always useful to specify which version of Elasticsearch you are using.

---

<div class="post-metadata">

### Author: ![vijay117](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@vijay117](https://discuss.elastic.co/u/vijay117)
#### Post date: [June 3, 2024, 9:34am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/3 "2024-06-03T09:34:38Z")

</div>

Hi Christian

Elasticsearch version: 8+

Below is the template, i used Kibana console to create template

```auto
{
  "template": {
    "settings": {
      "index": {
        "routing": {
          "allocation": {
            "include": {
              "_tier_preference": "data_content"
            }
          }
        },
        "mapping": {
          "total_fields": {
            "limit": "15000"
          }
        }
      }
    },
    "mappings": {
      "dynamic_templates": []
    },
    "aliases": {}
  }
}

```

and index creation

```auto
elasticsearch {
            hosts => ["${ES_NODE}"]
            validate_after_inactivity => 0
            resurrect_delay => 300
            index => "logstash-mcmc-combined-%{+YYYY-MM}"
            action => "update"
            document_id => "%{session_id}"
            doc_as_upsert => true
            user => "${ES_USER_NAME}"
            password => "${ES_USER_PASSWORD}"
            ssl_enabled => true
            ssl_verification_mode => "${SSL_VERIF_MODE}"
            ssl_certificate_authorities => "xxx"
            ssl_key => "xxx"
            ssl_certificate => "xxxx"
         }

```

Note: I am new to ELK

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 3, 2024, 10:06am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/4 "2024-06-03T10:06:38Z")

</div>

You did not specify any index pattern the template should apply to. Have a look [at the examples in the docs](https://www.elastic.co/guide/en/elasticsearch/reference/8.13/index-templates.html).

---

<div class="post-metadata">

### Author: ![vijay117](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@vijay117](https://discuss.elastic.co/u/vijay117)
#### Post date: [June 3, 2024, 10:16am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/5 "2024-06-03T10:16:30Z")

</div>

I did, look at the below screen shot

 ![Image 03-06-2024 at 11.16](https://us1.discourse-cdn.com/elastic/original/3X/d/8/d85d37eb9c03bf66539c6021828380dbc7f4df38.jpeg)

index eg:logstash-mcmc-combined-2023-06

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [June 3, 2024, 10:22am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/6 "2024-06-03T10:22:00Z")

</div>

There is nothing in the template you posted. I do not use Kibana to manage index templates so am not sure what that screenshot shows.

---

<div class="post-metadata">

### Author: ![vijay117](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@vijay117](https://discuss.elastic.co/u/vijay117)
#### Post date: [June 3, 2024, 10:53am UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/7 "2024-06-03T10:53:01Z")

</div>

It shows the Index pattern in the template created

---

<div class="post-metadata">

### Author: ![vijay117](https://avatars.discourse-cdn.com/v4/letter/v/e0b2c6/32.png) [@vijay117](https://discuss.elastic.co/u/vijay117)
#### Post date: [June 3, 2024, 1:33pm UTC](https://discuss.elastic.co/t/index-template-not-getting-applied-to-my-index/360697/8 "2024-06-03T13:33:05Z")

</div>

I got it now, there was another template having more priority which is why my template is not picked. Thanks chris
