# Management of indexes

**URL:** <https://discuss.elastic.co/t/management-of-indexes/13072>\
**Category:** Elasticsearch\
**Created:** [August 5, 2013, 2:21pm UTC](https://discuss.elastic.co/t/management-of-indexes/13072 "2013-08-05T14:21:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hubert\_Raff](https://avatars.discourse-cdn.com/v4/letter/h/e79b87/32.png) [@Hubert\_Raff](https://discuss.elastic.co/u/Hubert_Raff)\
**Post date:** [August 5, 2013, 2:21pm UTC](https://discuss.elastic.co/t/management-of-indexes/13072/1 "2013-08-05T14:21:58Z")

</div>

Hi,

I use Elasticsearch on my log access of several website. I create one index  
per day for every websites. I would have a visibilty of my log access on a  
period of 24 hours. But, for the moment, I close every index of the day  
before every morning. So I only have a visibility of few of hours.

I have 2 solutions for my problem:

- I create a index per hour instead of one index per day. But I think it's  
a bad idea because I will get too many indexes. Maybe I have totally wrong.
- Or I duplicate my index of the day before. i close the original index, in  
the case of I need them later. And I use "delete by query" on my copy every  
hour to keep a visibility of 24 hours. But I don't know how to do to have 2  
index with the same name (one open and one close).

Do you have any advice for my problem?

Hubert

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [August 5, 2013, 7:15pm UTC](https://discuss.elastic.co/t/management-of-indexes/13072/2 "2013-08-05T19:15:52Z")

</div>

For 24 hour sliding window and daily indexes, you can try the following:  
close index of the day before yesterday, so you have two indexes open, for  
yesterday and today. Then use a filter in your query on the timestamp field  
from now minus 24 \* 3600 seconds, using the two day indexes in your query.

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 6, 2017, 2:22am UTC](https://discuss.elastic.co/t/management-of-indexes/13072/3 "2017-07-06T02:22:49Z")

</div>


