Nils,

This is just the nature of splitting data around in shards. Actually the 
terms facet has the same limitations (i.e. it will also give "approximate 
counts"). Neither the terms facet nor the terms aggregation is better or 
worse than the other - they are both approximations (using different 
implementations). It is correct that if you put all your data in 1 shard, 
then all the counts are exact. If you need to shard, you can increase the 
"shard_size" parameter inside the terms aggregation to "improve accuracy". 
Play with that number until it suits your purposes but the important thing 
is they are just approximations the more documents you have in the index - 
so just don't expect absolute numbers from them if you have more than 1 
shard.

{
  "size": 0,
  "aggs": {
    "a": {
      "terms": {
        "field": "actor.displayName",
        "shard_size": 10000
      }
    }
  }
}

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/e86b5a00-b2ba-4ce9-a116-fbbddf2ebffe%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to