# How to rationalize the index name(s) to query with rollover?

**URL:** <https://discuss.elastic.co/t/how-to-rationalize-the-index-name-s-to-query-with-rollover/222846>\
**Category:** Elasticsearch\
**Created:** [March 10, 2020, 3:49am UTC](https://discuss.elastic.co/t/how-to-rationalize-the-index-name-s-to-query-with-rollover/222846 "2020-03-10T03:49:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Newlastic](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@Newlastic](https://discuss.elastic.co/u/Newlastic)\
**Post date:** [March 10, 2020, 3:49am UTC](https://discuss.elastic.co/t/how-to-rationalize-the-index-name-s-to-query-with-rollover/222846/1 "2020-03-10T03:49:07Z")

</div>

Hello,

Suppose we have an index that rolls over approximately every day.

We retain 100 days of historical indexes, the older ones in colder storage.

Is there a method for targeting queries with time range restrictions to specific indexes? Eg if I fire off a query that asks for documents with a time stamp between two specific dates, is there a way, or a pattern, which would limit my query only to those indexes in scope? Would I need to target the indexes explicitly when querying?

I hope this makes sense! Thank you.

---

<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:** [April 7, 2020, 3:49am UTC](https://discuss.elastic.co/t/how-to-rationalize-the-index-name-s-to-query-with-rollover/222846/2 "2020-04-07T03:49:07Z")

</div>

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