# Separate queries on each index to be searched

**URL:** <https://discuss.elastic.co/t/separate-queries-on-each-index-to-be-searched/7680>\
**Category:** Elasticsearch\
**Created:** [May 14, 2012, 11:37am UTC](https://discuss.elastic.co/t/separate-queries-on-each-index-to-be-searched/7680 "2012-05-14T11:37:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_2](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@Jay\_2](https://discuss.elastic.co/u/Jay_2)\
**Post date:** [May 14, 2012, 11:37am UTC](https://discuss.elastic.co/t/separate-queries-on-each-index-to-be-searched/7680/1 "2012-05-14T11:37:11Z")

</div>

Hi all;  
I want to know is there any mechanism in ES so that we can have  
separate queries on each index needs to searched but the result should  
be in consolidated form.  
Thanks;  
Jay

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [May 14, 2012, 2:12pm UTC](https://discuss.elastic.co/t/separate-queries-on-each-index-to-be-searched/7680/2 "2012-05-14T14:12:33Z")

</div>

Would several Indices Queries[http://www.elasticsearch.org/guide/reference/query-dsl/indices-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/indices-query.html)combined into a Bool  
Query[http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html)work for you?

On Monday, May 14, 2012 7:37:11 AM UTC-4, jay wrote:

> Hi all;  
> I want to know is there any mechanism in ES so that we can have  
> separate queries on each index needs to searched but the result should  
> be in consolidated form.  
> Thanks;  
> Jay

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 15, 2012, 8:48pm UTC](https://discuss.elastic.co/t/separate-queries-on-each-index-to-be-searched/7680/3 "2012-05-15T20:48:30Z")

</div>

As Igor suggested, indices query can help, sadly, it would have been great  
to be able to specify several queries for each index/indices, instead of a  
"2" option thingy. Can you open an issue? Lets think of a format for it..

On Mon, May 14, 2012 at 5:12 PM, Igor Motov [imotov@gmail.com](mailto:imotov@gmail.com) wrote:

> Would several Indices Queries[http://www.elasticsearch.org/guide/reference/query-dsl/indices-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/indices-query.html)combined into a Bool  
> Query[http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/bool-query.html)work for you?
> 
> On Monday, May 14, 2012 7:37:11 AM UTC-4, jay wrote:
> 
> > Hi all;  
> > I want to know is there any mechanism in ES so that we can have  
> > separate queries on each index needs to searched but the result should  
> > be in consolidated form.  
> > Thanks;  
> > Jay

---

<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, 3:28am UTC](https://discuss.elastic.co/t/separate-queries-on-each-index-to-be-searched/7680/4 "2017-07-06T03:28:39Z")

</div>


