# Specify indexes for searching

**URL:** <https://discuss.elastic.co/t/specify-indexes-for-searching/90492>\
**Category:** Elasticsearch\
**Created:** [June 22, 2017, 3:48pm UTC](https://discuss.elastic.co/t/specify-indexes-for-searching/90492 "2017-06-22T15:48:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdidomenico](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@mdidomenico](https://discuss.elastic.co/u/mdidomenico)\
**Post date:** [June 22, 2017, 3:48pm UTC](https://discuss.elastic.co/t/specify-indexes-for-searching/90492/1 "2017-06-22T15:48:58Z")

</div>

I have indexes in the format of  
indexname-2017.01.01  
indexname-2017.01.02  
...etc...

these go back several years. when i try to query the system using

index: indexname-\*

i end up getting the dreaded 'you're trying to query to many shards error'. if i specify one index indexname-2017.01.01 the query works just fine.

my question is there a way to specify a range of indexes for the query, (ie only look in indexes between these two dates)

---

<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 20, 2017, 3:49pm UTC](https://discuss.elastic.co/t/specify-indexes-for-searching/90492/2 "2017-07-20T15:49:23Z")

</div>

Closed on July 20, 2017, 3:49pm UTC

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