# Compute alias from index name when using index template

**URL:** <https://discuss.elastic.co/t/compute-alias-from-index-name-when-using-index-template/228450>\
**Category:** Elasticsearch\
**Created:** [April 17, 2020, 5:02am UTC](https://discuss.elastic.co/t/compute-alias-from-index-name-when-using-index-template/228450 "2020-04-17T05:02:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinlian\_Chen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jinlian_chen/32/44738_2.png) [@Jinlian\_Chen](https://discuss.elastic.co/u/Jinlian_Chen)\
**Post date:** [April 17, 2020, 5:02am UTC](https://discuss.elastic.co/t/compute-alias-from-index-name-when-using-index-template/228450/1 "2020-04-17T05:02:57Z")

</div>

I have check some discussion on [#5359](https://github.com/elastic/elasticsearch/issues/5359), seems nothing do for it.  
I have some index like receipt\_2018\_v1, receipt\_2019\_v1, if I change the mapping, the index name will go to receipt\_2018\_v2, receipt\_2019\_v2, the alias of these index are read\_receipt\_2018, read\_receipt\_2019.  
I check the [doc](https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html#put-index-template-api-example), it only support some placeholder, any suggestion on this use case? Or am I missing some other way?

---

<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:** [May 15, 2020, 5:02am UTC](https://discuss.elastic.co/t/compute-alias-from-index-name-when-using-index-template/228450/2 "2020-05-15T05:02:58Z")

</div>

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