I have a strange issue when changing the aggregation size and doc_counts returned. It's a straight-forward wildcard query using query_string with some filters applied, and one aggregation. Setting the size to 10, I have a key in the bucket with a doc_count of 4. If I only change the size of the aggregation from 10 to 20, the doc_count for the same key changes to 6. Any idea what the issue might be? I'm using Elasticsearch version: 5.3.1 set up as a 3-node cluster.
Thanks for any help!
The results of the terms aggregation can have a small error, see the following page of the documentation for an in-depth explanation as to why this is the case: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-approximate-counts
As mentioned on that page, you can use the
shard_size parameter to trade more resource usage for better accuracy.
Oh I see, clearly explained. Thanks Colin.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.