# Accuracy of aggregation when having queries

**URL:** <https://discuss.elastic.co/t/accuracy-of-aggregation-when-having-queries/19396>\
**Category:** Elasticsearch\
**Created:** [August 21, 2014, 5:02pm UTC](https://discuss.elastic.co/t/accuracy-of-aggregation-when-having-queries/19396 "2014-08-21T17:02:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![roxana](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@roxana](https://discuss.elastic.co/u/roxana)\
**Post date:** [August 21, 2014, 5:02pm UTC](https://discuss.elastic.co/t/accuracy-of-aggregation-when-having-queries/19396/1 "2014-08-21T17:02:36Z")

</div>

I am reading this post about not having maximum accuracy on aggregation  
results on terms, when adding the "size"  
parameter: [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#\_document\_counts\_are\_approximate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_document_counts_are_approximate)  
Does this lack of accuracy happen when you also have a query? like:  
{  
query:{....}  
aggs{....}  
}  
Thanks,  
Roxana

--  
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/5561a5cc-eef9-456f-a32c-c0be70d6e4ac%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5561a5cc-eef9-456f-a32c-c0be70d6e4ac%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:** [August 22, 2014, 11:29pm UTC](https://discuss.elastic.co/t/accuracy-of-aggregation-when-having-queries/19396/2 "2014-08-22T23:29:39Z")

</div>

Yes, this issue also exists if you specify a query.

On Thu, Aug 21, 2014 at 7:02 PM, Roxana Balaci [ro.balaci@gmail.com](mailto:ro.balaci@gmail.com) wrote:

> I am reading this post about not having maximum accuracy on aggregation  
> results on terms, when adding the "size" parameter:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_document_counts_are_approximate)  
> Does this lack of accuracy happen when you also have a query? like:  
> {  
> query:{....}  
> aggs{....}  
> }  
> Thanks,  
> Roxana
> 
> --  
> 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/5561a5cc-eef9-456f-a32c-c0be70d6e4ac%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5561a5cc-eef9-456f-a32c-c0be70d6e4ac%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/5561a5cc-eef9-456f-a32c-c0be70d6e4ac%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5561a5cc-eef9-456f-a32c-c0be70d6e4ac%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/CAL6Z4j6eR3wzjZfS53HC%2B32bHmn1LeOvmRUojjWh9TAw6mmtVQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6eR3wzjZfS53HC%2B32bHmn1LeOvmRUojjWh9TAw6mmtVQ%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:06am UTC](https://discuss.elastic.co/t/accuracy-of-aggregation-when-having-queries/19396/3 "2017-07-06T01:06:52Z")

</div>


