# Can aggregation use a prepared result of real-time Map Reduce task?

**URL:** <https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131>\
**Category:** Elasticsearch\
**Created:** [August 7, 2014, 4:00am UTC](https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131 "2014-08-07T04:00:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tong\_Liu](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@Tong\_Liu](https://discuss.elastic.co/u/Tong_Liu)\
**Post date:** [August 7, 2014, 4:00am UTC](https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131/1 "2014-08-07T04:00:31Z")

</div>

(I move the topic from github issue to here)

I want to know the theory of ES aggregation.  
Maybe, it is one of them:  
(1) like a Database. compute when the aggregation query comes.  
(2) like Storm. When a data comes, it aggregate once. You don't need  
aggregate when query comes. The aggregation query use a prepared result. So  
it is very quick when query. Storm is like a real-time Hadoop.

So ES is like (1)a common Database? or (2)Storm?  
Thank you!

(

This is imotov answer:

In short the answer to your question is aggregations are computed when an  
aggregation query comes, but because of data structures that elasticsearch  
is using, they can computed in very efficient manner.

)

--  
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/c8bd9a10-4698-4563-8f04-b79e5f9c4bc2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c8bd9a10-4698-4563-8f04-b79e5f9c4bc2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tong\_Liu](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@Tong\_Liu](https://discuss.elastic.co/u/Tong_Liu)\
**Post date:** [August 7, 2014, 4:02am UTC](https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131/2 "2014-08-07T04:02:55Z")

</div>

I still want to know some basic theory about that efficient manner.  
Thank you very much!

在 2014年8月7日星期四UTC+8下午12时00分31秒，Tong Liu写道：

> (I move the topic from github issue to here)
> 
> I want to know the theory of ES aggregation.  
> Maybe, it is one of them:  
> (1) like a Database. compute when the aggregation query comes.  
> (2) like Storm. When a data comes, it aggregate once. You don't need  
> aggregate when query comes. The aggregation query use a prepared result. So  
> it is very quick when query. Storm is like a real-time Hadoop.
> 
> So ES is like (1)a common Database? or (2)Storm?  
> Thank you!
> 
> (
> 
> This is imotov answer:
> 
> In short the answer to your question is aggregations are computed when an  
> aggregation query comes, but because of data structures that elasticsearch  
> is using, they can computed in very efficient manner.
> 
> )

On Thursday, August 7, 2014 12:00:31 PM UTC+8, Tong Liu wrote:

> (I move the topic from github issue to here)
> 
> I want to know the theory of ES aggregation.  
> Maybe, it is one of them:  
> (1) like a Database. compute when the aggregation query comes.  
> (2) like Storm. When a data comes, it aggregate once. You don't need  
> aggregate when query comes. The aggregation query use a prepared result. So  
> it is very quick when query. Storm is like a real-time Hadoop.
> 
> So ES is like (1)a common Database? or (2)Storm?  
> Thank you!
> 
> (
> 
> This is imotov answer:
> 
> In short the answer to your question is aggregations are computed when an  
> aggregation query comes, but because of data structures that elasticsearch  
> is using, they can computed in very efficient manner.
> 
> )

--  
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/22f55524-4778-4ed6-858c-4a4994ef7b5e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/22f55524-4778-4ed6-858c-4a4994ef7b5e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tong\_Liu](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@Tong\_Liu](https://discuss.elastic.co/u/Tong_Liu)\
**Post date:** [August 7, 2014, 4:03am UTC](https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131/3 "2014-08-07T04:03:44Z")

</div>

I still want to know some basic theory about that efficient manner.

On Thursday, August 7, 2014 12:00:31 PM UTC+8, Tong Liu wrote:

> (I move the topic from github issue to here)
> 
> I want to know the theory of ES aggregation.  
> Maybe, it is one of them:  
> (1) like a Database. compute when the aggregation query comes.  
> (2) like Storm. When a data comes, it aggregate once. You don't need  
> aggregate when query comes. The aggregation query use a prepared result. So  
> it is very quick when query. Storm is like a real-time Hadoop.
> 
> So ES is like (1)a common Database? or (2)Storm?  
> Thank you!
> 
> (
> 
> This is imotov answer:
> 
> In short the answer to your question is aggregations are computed when an  
> aggregation query comes, but because of data structures that elasticsearch  
> is using, they can computed in very efficient manner.
> 
> )

--  
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/eeedcf51-a0e0-4016-ab83-2854d32acb69%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eeedcf51-a0e0-4016-ab83-2854d32acb69%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Tong\_Liu](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@Tong\_Liu](https://discuss.elastic.co/u/Tong_Liu)\
**Post date:** [August 28, 2014, 4:21pm UTC](https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131/4 "2014-08-28T16:21:11Z")

</div>

Hi, is there some one know?  
Is the aggregation have a cache? And +1 to the cache, when new proper data  
comes?  
Query visit the cache, not calculate from index and shard?

On Thursday, August 7, 2014 12:03:44 PM UTC+8, Tong Liu wrote:

> I still want to know some basic theory about that efficient manner.
> 
> On Thursday, August 7, 2014 12:00:31 PM UTC+8, Tong Liu wrote:
> 
> > (I move the topic from github issue to here)
> > 
> > I want to know the theory of ES aggregation.  
> > Maybe, it is one of them:  
> > (1) like a Database. compute when the aggregation query comes.  
> > (2) like Storm. When a data comes, it aggregate once. You don't need  
> > aggregate when query comes. The aggregation query use a prepared result. So  
> > it is very quick when query. Storm is like a real-time Hadoop.
> > 
> > So ES is like (1)a common Database? or (2)Storm?  
> > Thank you!
> > 
> > (
> > 
> > This is imotov answer:
> > 
> > In short the answer to your question is aggregations are computed when an  
> > aggregation query comes, but because of data structures that elasticsearch  
> > is using, they can computed in very efficient manner.
> > 
> > )

--  
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/afc5d7e7-60e0-4b2e-8535-d6bb09e21fc8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/afc5d7e7-60e0-4b2e-8535-d6bb09e21fc8%40googlegroups.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:05am UTC](https://discuss.elastic.co/t/can-aggregation-use-a-prepared-result-of-real-time-map-reduce-task/19131/5 "2017-07-06T01:05:46Z")

</div>


