# Adding index to dynamic list of aliases

**URL:** <https://discuss.elastic.co/t/adding-index-to-dynamic-list-of-aliases/51986>\
**Category:** Elasticsearch\
**Created:** [June 6, 2016, 5:46pm UTC](https://discuss.elastic.co/t/adding-index-to-dynamic-list-of-aliases/51986 "2016-06-06T17:46:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shushu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shushu/32/10037_2.png) [@shushu](https://discuss.elastic.co/u/shushu)\
**Post date:** [June 6, 2016, 5:46pm UTC](https://discuss.elastic.co/t/adding-index-to-dynamic-list-of-aliases/51986/1 "2016-06-06T17:46:35Z")

</div>

I have a time-based indices, so using [multi-writes](https://www.elastic.co/guide/en/elasticsearch/hadoop/master/configuration.html#cfg-multi-writes) I create an index every day (for example "index-2016-06-06").  
When executing queries I know the earliest date in which the data I am looking for exist, so my thought was to create an alias per day, saying "since-{date}" (for example "since-2016-06-06"), which will include all of the indices since the date till "now".

Using templates I can automatically add new index to alias, but - I can't easily add this new index to ALL of the relevant aliases.  
Is there a simple way to do it ?  
The only way I see it is by change the template on a daily basis - or create a huge list of templates, each per day, which will wait in advance for the upcoming new index.

Any ideas ?  
Thanks,  
Shushu

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 7, 2016, 12:03am UTC](https://discuss.elastic.co/t/adding-index-to-dynamic-list-of-aliases/51986/2 "2016-06-07T00:03:24Z")

</div>

[Elasticsearch Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html) can manage this.

---

<div class="post-metadata">

**Author:** ![shushu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shushu/32/10037_2.png) [@shushu](https://discuss.elastic.co/u/shushu)\
**Post date:** [June 7, 2016, 7:36am UTC](https://discuss.elastic.co/t/adding-index-to-dynamic-list-of-aliases/51986/3 "2016-06-07T07:36:16Z")

</div>

If I understand correctly, Curator just wrap the existing elastic API with nice command line interface.  
Does it adds some extra capabilities I failed to grasp ?

---

<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:** [July 5, 2017, 10:45pm UTC](https://discuss.elastic.co/t/adding-index-to-dynamic-list-of-aliases/51986/4 "2017-07-05T22:45:43Z")

</div>


