# Accuracy of Elastic Search Aggregates and Filters

**URL:** <https://discuss.elastic.co/t/accuracy-of-elastic-search-aggregates-and-filters/21357>\
**Category:** Elasticsearch\
**Created:** [December 22, 2014, 6:51pm UTC](https://discuss.elastic.co/t/accuracy-of-elastic-search-aggregates-and-filters/21357 "2014-12-22T18:51:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijay\_arora](https://avatars.discourse-cdn.com/v4/letter/v/d6d6ee/32.png) [@vijay\_arora](https://discuss.elastic.co/u/vijay_arora)\
**Post date:** [December 22, 2014, 6:51pm UTC](https://discuss.elastic.co/t/accuracy-of-elastic-search-aggregates-and-filters/21357/1 "2014-12-22T18:51:45Z")

</div>

I am new to ES and evaluating ES for its analytic strengths.  
Based on documentation i have read so far, the cardinality agg is not  
accurate.  
What i want to find out is that if the other aggs are accurate or not?  
Especially with Filters applied.

If by default they are not accurate is there a work around to get accuracy  
in the ES queries.

Thanks  
Vijay

--  
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/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [December 24, 2014, 4:41pm UTC](https://discuss.elastic.co/t/accuracy-of-elastic-search-aggregates-and-filters/21357/2 "2014-12-24T16:41:29Z")

</div>

The terms, cardinality, percentiles and geo\_hash grid aggregations trade  
accuracy for speed/memory , you can expect other aggregations to return  
accurate results.

On Mon, Dec 22, 2014 at 7:51 PM, vijay arora [arorav@uw.edu](mailto:arorav@uw.edu) wrote:

> I am new to ES and evaluating ES for its analytic strengths.  
> Based on documentation i have read so far, the cardinality agg is not  
> accurate.  
> What i want to find out is that if the other aggs are accurate or not?  
> Especially with Filters applied.
> 
> If by default they are not accurate is there a work around to get accuracy  
> in the ES queries.
> 
> Thanks  
> Vijay
> 
> --  
> 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/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
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/CAL6Z4j7VA3vR4Xg%3Dv6P0sZdERdLRVJ%2BA0Y42HeyNO8GkC6FkWg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7VA3vR4Xg%3Dv6P0sZdERdLRVJ%2BA0Y42HeyNO8GkC6FkWg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [December 24, 2014, 4:53pm UTC](https://discuss.elastic.co/t/accuracy-of-elastic-search-aggregates-and-filters/21357/3 "2014-12-24T16:53:47Z")

</div>

I think the key part of the question here is about filters? Filters are  
always up to date modulo refresh interval. Its pretty efficient because  
Lucene's segments are immutable so once a filter has been applied to a  
segment you can cache its results and merge it with the deletes list to  
have for as long as you have the memory to keep the cache around.

Nik

On Wed, Dec 24, 2014 at 11:41 AM, Adrien Grand \<  
[adrien.grand@elasticsearch.com](mailto:adrien.grand@elasticsearch.com)\> wrote:

> The terms, cardinality, percentiles and geo\_hash grid aggregations trade  
> accuracy for speed/memory , you can expect other aggregations to return  
> accurate results.
> 
> On Mon, Dec 22, 2014 at 7:51 PM, vijay arora [arorav@uw.edu](mailto:arorav@uw.edu) wrote:
> 
> > I am new to ES and evaluating ES for its analytic strengths.  
> > Based on documentation i have read so far, the cardinality agg is not  
> > accurate.  
> > What i want to find out is that if the other aggs are accurate or not?  
> > Especially with Filters applied.
> > 
> > If by default they are not accurate is there a work around to get  
> > accuracy in the ES queries.
> > 
> > Thanks  
> > Vijay
> > 
> > --  
> > 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/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/488cca8f-9113-417d-9a91-a9c6d8447cd8%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> Adrien Grand
> 
> --  
> 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/CAL6Z4j7VA3vR4Xg%3Dv6P0sZdERdLRVJ%2BA0Y42HeyNO8GkC6FkWg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7VA3vR4Xg%3Dv6P0sZdERdLRVJ%2BA0Y42HeyNO8GkC6FkWg%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7VA3vR4Xg%3Dv6P0sZdERdLRVJ%2BA0Y42HeyNO8GkC6FkWg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j7VA3vR4Xg%3Dv6P0sZdERdLRVJ%2BA0Y42HeyNO8GkC6FkWg%40mail.gmail.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/CAPmjWd0y7kSP9X5Vt7AvjpZoOsKBWDsDscWY4jKzoYYWAMwjMQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0y7kSP9X5Vt7AvjpZoOsKBWDsDscWY4jKzoYYWAMwjMQ%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, 12:42am UTC](https://discuss.elastic.co/t/accuracy-of-elastic-search-aggregates-and-filters/21357/4 "2017-07-06T00:42:00Z")

</div>


