# Purpose and usage of index at ES

**URL:** <https://discuss.elastic.co/t/purpose-and-usage-of-index-at-es/186843>\
**Category:** Elasticsearch\
**Created:** [June 21, 2019, 9:13am UTC](https://discuss.elastic.co/t/purpose-and-usage-of-index-at-es/186843 "2019-06-21T09:13:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NAHA](https://avatars.discourse-cdn.com/v4/letter/n/5fc32e/32.png) [@NAHA](https://discuss.elastic.co/u/NAHA)\
**Post date:** [June 21, 2019, 9:13am UTC](https://discuss.elastic.co/t/purpose-and-usage-of-index-at-es/186843/1 "2019-06-21T09:13:47Z")

</div>

Hi ,

I am using ES version 6.7.0. I am sending to ES , so I created index every day.

I just want to know Purpose and usage of index at ES.  
Which is the best way to store logs, per day or all in one index.

Thanks in advance

---

<div class="post-metadata">

**Author:** ![thekm1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thekm1/32/35926_2.png) [@thekm1](https://discuss.elastic.co/u/thekm1)\
**Post date:** [June 21, 2019, 9:23am UTC](https://discuss.elastic.co/t/purpose-and-usage-of-index-at-es/186843/2 "2019-06-21T09:23:12Z")

</div>

Hi @NAHA  
From my point of view it is good to create an index per day. So if you want to delete data older than 1 month you just need to delete the indices which are older. this gets complicated if you have all the data in one index. [For cleaning up the indices you can use curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/current/delete_indices.html)

But let me also tell the advantage of [Index lifecycle Management](https://www.elastic.co/guide/en/elasticsearch/reference/6.7/index-lifecycle-management.html). This feature allows you to manage indices depending on a policy which you can define. For example create a new index if the index is 20gb, or 2 days old. I can suggest this feature very well.

---

<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 19, 2019, 9:23am UTC](https://discuss.elastic.co/t/purpose-and-usage-of-index-at-es/186843/3 "2019-07-19T09:23:23Z")

</div>

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