# Lifecycle Policies two index templates

**URL:** <https://discuss.elastic.co/t/lifecycle-policies-two-index-templates/203254>\
**Category:** Elasticsearch\
**Created:** [October 11, 2019, 3:05pm UTC](https://discuss.elastic.co/t/lifecycle-policies-two-index-templates/203254 "2019-10-11T15:05:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdotson](https://avatars.discourse-cdn.com/v4/letter/k/ed655f/32.png) [@kdotson](https://discuss.elastic.co/u/kdotson)\
**Post date:** [October 11, 2019, 3:05pm UTC](https://discuss.elastic.co/t/lifecycle-policies-two-index-templates/203254/1 "2019-10-11T15:05:11Z")

</div>

I have two very similar index templates with the same mappings but changes in replications and Lifecycle policies. See templates below, INDEX 1 has "template": "bwlog\*" with "order": 5 and a Lifecycle management. INDEX 2 has "template": "bwlog\*apache" with order: 10 and no lifecycle management.

The indexes have been working great until I added the lifecycle management to the one temple.  
Now both indexes are being created with the lifecycle management associated. The "number\_of\_replicas" is being applied correctly to the individual indexes at creation.

INDEX 1:  
{  
"template": "bwlog\*",  
"order": "5",  
"aliases": {  
},  
"settings": {  
"index": {  
"number\_of\_replicas": "1",  
"number\_of\_shards": "60",  
"refresh\_interval" : "15s"  
},  
"index.codec": "best\_compression",  
"index.lifecycle.name": "warm2days\_delete10days",  
"index.routing.allocation.require.box\_type" : "hot"  
},  
"mappings": {  
....

INDEX 2:  
{  
"template": "bwlog_apache_",  
"order": "10",  
"aliases": {  
},  
"settings": {  
"index.routing.allocation.require.box\_type": "hot",  
"index": {  
"number\_of\_replicas": "1",  
"number\_of\_shards": "1",  
"refresh\_interval" : "15s"  
},  
"index.codec": "best\_compression"  
},  
"mappings": {  
........

I am guessing this is a hierarchy issue of some sort, can anyone provide some direction?

---

<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:** [November 8, 2019, 3:05pm UTC](https://discuss.elastic.co/t/lifecycle-policies-two-index-templates/203254/2 "2019-11-08T15:05:23Z")

</div>

Closed on November 8, 2019, 3:05pm UTC

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