# Best practice index naming

**URL:** <https://discuss.elastic.co/t/best-practice-index-naming/38007>\
**Category:** Elasticsearch\
**Created:** [December 27, 2015, 1:55pm UTC](https://discuss.elastic.co/t/best-practice-index-naming/38007 "2015-12-27T13:55:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Samusenko](https://avatars.discourse-cdn.com/v4/letter/i/13edae/32.png) [@Igor\_Samusenko](https://discuss.elastic.co/u/Igor_Samusenko)\
**Post date:** [December 27, 2015, 1:55pm UTC](https://discuss.elastic.co/t/best-practice-index-naming/38007/1 "2015-12-27T13:55:47Z")

</div>

Hi everyone,  
I started learning about Elasticsearch last week and I found it great.  
I noticed that by default Logstash ( yes we want to use elastic for storing logs, but I guess we will go further than storing logs) names indexes as myindex\_yyyy.mm.dd.  
What is the purpose of this approach, what is the benefit ?  
I found that we can easily search by indexes like myindex\_\_\* or myindex\_2015.\*.  
So, my main question is: why is that set by default, do I have to do the same? What will be different if I name index just myindex without date ?

Best, Ihor.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [December 27, 2015, 3:03pm UTC](https://discuss.elastic.co/t/best-practice-index-naming/38007/2 "2015-12-27T15:03:28Z")

</div>

The main reason for using time based indices is that it is an easy and efficient way to manage retention of data, as [described here](https://www.elastic.co/guide/en/elasticsearch/guide/current/time-based.html?q=time%20based). Another side effect of this is that queries can be made to just hit the shards that hold data for a specific time period, which can improve performance.

---

<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, 11:28pm UTC](https://discuss.elastic.co/t/best-practice-index-naming/38007/3 "2017-07-05T23:28:27Z")

</div>


