# Time-series index: query with time-window

**URL:** <https://discuss.elastic.co/t/time-series-index-query-with-time-window/109033>\
**Category:** Elasticsearch\
**Created:** [November 24, 2017, 1:08pm UTC](https://discuss.elastic.co/t/time-series-index-query-with-time-window/109033 "2017-11-24T13:08:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cerbi](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@cerbi](https://discuss.elastic.co/u/cerbi)\
**Post date:** [November 24, 2017, 1:08pm UTC](https://discuss.elastic.co/t/time-series-index-query-with-time-window/109033/1 "2017-11-24T13:08:39Z")

</div>

Hi,  
I'm using time-series indices with the following pattern: message\_YYYY.MM.DD  
I'd like to perform queries for documents inside a certain time-window.

Something like:

GET /_{from message\_2017.11.05 to message\_2017.11.07}_ /\_search

Is it possible?

Thanks  
Sarah

---

<div class="post-metadata">

**Author:** ![luiz.santos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luiz.santos/32/24664_2.png) [@luiz.santos](https://discuss.elastic.co/u/luiz.santos)\
**Post date:** [November 27, 2017, 2:55pm UTC](https://discuss.elastic.co/t/time-series-index-query-with-time-window/109033/2 "2017-11-27T14:55:57Z")

</div>

Hi Sarah,

You can inform multiple indices in the URL separated by comma. For example, you could do something like this:

`GET message_2017.11.05,message_2017.11.06,message_2017.11.07/_search`

It is possible to use wildcard too. If you want to search for November messages:

`GET message_2017.11*/_search`

---

<div class="post-metadata">

**Author:** ![cerbi](https://avatars.discourse-cdn.com/v4/letter/c/91b2a8/32.png) [@cerbi](https://discuss.elastic.co/u/cerbi)\
**Post date:** [November 27, 2017, 3:19pm UTC](https://discuss.elastic.co/t/time-series-index-query-with-time-window/109033/3 "2017-11-27T15:19:11Z")

</div>

Ciao Luiz,  
thanks for your reply.  
Ok, so I have to list all days.

Thanks  
Sarah

---

<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:** [December 25, 2017, 3:33pm UTC](https://discuss.elastic.co/t/time-series-index-query-with-time-window/109033/4 "2017-12-25T15:33:08Z")

</div>

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