# Aggregate results over multiple indices

**URL:** <https://discuss.elastic.co/t/aggregate-results-over-multiple-indices/19112>\
**Category:** Elasticsearch\
**Created:** [August 6, 2014, 8:07am UTC](https://discuss.elastic.co/t/aggregate-results-over-multiple-indices/19112 "2014-08-06T08:07:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [August 6, 2014, 8:07am UTC](https://discuss.elastic.co/t/aggregate-results-over-multiple-indices/19112/1 "2014-08-06T08:07:14Z")

</div>

Hi,

If I have three different indices with the same schema mapping for a type,  
can I use the SearchRequestBuilder (or any other class) to simultaneously  
query all three indices and have ElasticSearch perform aggregations/sorts  
on the results from all three?

Thanks,  
Sandeep

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/23cca37f-b999-4016-be3c-7e4eda34b28a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/23cca37f-b999-4016-be3c-7e4eda34b28a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 6, 2014, 8:50am UTC](https://discuss.elastic.co/t/aggregate-results-over-multiple-indices/19112/2 "2014-08-06T08:50:33Z")

</div>

Hey,

sure you can, just specify those indices in your request, see

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--Alex

On Wed, Aug 6, 2014 at 10:07 AM, 'Sandeep Ramesh Khanzode' via  
elasticsearch [elasticsearch@googlegroups.com](mailto:elasticsearch@googlegroups.com) wrote:

> Hi,
> 
> If I have three different indices with the same schema mapping for a type,  
> can I use the SearchRequestBuilder (or any other class) to simultaneously  
> query all three indices and have Elasticsearch perform aggregations/sorts  
> on the results from all three?
> 
> Thanks,  
> Sandeep
> 
> --  
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/23cca37f-b999-4016-be3c-7e4eda34b28a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/23cca37f-b999-4016-be3c-7e4eda34b28a%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/23cca37f-b999-4016-be3c-7e4eda34b28a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/23cca37f-b999-4016-be3c-7e4eda34b28a%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8o15PqD\_pQAdBTJS\_LfmSt1%3DkQW2umvWEkGRuMMK\_Dww%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8o15PqD_pQAdBTJS_LfmSt1%3DkQW2umvWEkGRuMMK_Dww%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:10am UTC](https://discuss.elastic.co/t/aggregate-results-over-multiple-indices/19112/3 "2017-07-06T01:10:31Z")

</div>


