# Index aliases and daily indices

**URL:** <https://discuss.elastic.co/t/index-aliases-and-daily-indices/95686>\
**Category:** Elasticsearch\
**Created:** [August 3, 2017, 9:55am UTC](https://discuss.elastic.co/t/index-aliases-and-daily-indices/95686 "2017-08-03T09:55:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)\
**Post date:** [August 3, 2017, 9:55am UTC](https://discuss.elastic.co/t/index-aliases-and-daily-indices/95686/1 "2017-08-03T09:55:04Z")

</div>

Hi,  
Can i ask what the recommendations are regarding aliases and time based indices? I ask because we encourage constrained searching with our users apps. if we use an alias for these indices (wildcarding) then all searches using the alias will be global.

Regards,  
David

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 3, 2017, 12:56pm UTC](https://discuss.elastic.co/t/index-aliases-and-daily-indices/95686/2 "2017-08-03T12:56:16Z")

</div>

You can have an alias named weekly which goes only to the last 7 days indices.  
And switch the alias every day by removing the older day and adding the new one.

Is that what you are looking for?

---

<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:** [August 31, 2017, 12:56pm UTC](https://discuss.elastic.co/t/index-aliases-and-daily-indices/95686/3 "2017-08-31T12:56:17Z")

</div>

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