# Correct way to use aliases?

**URL:** <https://discuss.elastic.co/t/correct-way-to-use-aliases/302931>\
**Category:** Elasticsearch\
**Created:** [April 21, 2022, 3:06pm UTC](https://discuss.elastic.co/t/correct-way-to-use-aliases/302931 "2022-04-21T15:06:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![caseydm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caseydm/32/26771_2.png) [@caseydm](https://discuss.elastic.co/u/caseydm)\
**Post date:** [April 21, 2022, 3:06pm UTC](https://discuss.elastic.co/t/correct-way-to-use-aliases/302931/1 "2022-04-21T15:06:57Z")

</div>

I am trying to improve the way I manage my indexes in Elasticsearch and am considering using aliases. But I want to make sure I understand the pattern properly. Right now I have some indexes that are grouped by year, and some that are standalone. Like this:

- works-v9-2000
- works-v9-2001
- works-v9-2002
- concepts-v6

My production app and logstash point to works like works-v9-_, and to concepts like concepts-v6. When I need to adjust fields and reindex, I simply increase the version number in my template and reindex. So I end up with works-v10-_. Then I point my development app at the next version and test it out. So I would point to works-v10\* to see if everything is good.

So how I can adjust this to use aliases? What I am thinking is something like this:

- Production indexes use regular alias like works and concepts
- My next index template has an alias set to the version, such as works-v10
- I do the reindex and point my app at the alias works-v10 to test it out.
- I run a single command in dev tools that switches works-v9-\* to point to alias works-v9, and make works-v10 point to works
- logstash ingest always points to the alias works so I don't need to touch it
- Once everything is good I close and delete works-v9-\*

Am I thinking about this correctly? Any tips or tricks I should be aware of?

---

<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 19, 2022, 3:07pm UTC](https://discuss.elastic.co/t/correct-way-to-use-aliases/302931/2 "2022-05-19T15:07:25Z")

</div>

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