Hi Yifan,

Nothing dynamic, but you can increase the number of terms collected on each
shard to increase the accuracy [1].  Might also want to play with the
shard_min_doc_count value if you know certain shards have a low hit count
and are throwing off the aggregations [2].

[1]
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_shard_size
[2]
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_minimum_document_count

Thanks,
Matt Weber


On Tue, Sep 16, 2014 at 12:36 PM, Yifan Wang <yifan.wang....@gmail.com>
wrote:

> It seems to be a common problem that the top N results returned from an
> aggregation query is inaccurate due to uneven distribution of matching
> documents on different shards, because ES will collect top N buckets from
> each shard no matter actually how many hits are on each shard. It is very
> often we collect buckets that should have not been collected on some
> shards, but we missed buckets that should have collected on some others.
>
> Is there a way we can collect buckets based on a dynamic "weight", for
> example "total hits", on that shard?
>
> Thanks in advance.
>
>  --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/e78571f9-d3e3-4d7c-a60e-d1a2052db397%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/e78571f9-d3e3-4d7c-a60e-d1a2052db397%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAJ3KEoCWieyr%3DW%2B_T0wxPr9L6_USLMKNQuMTNx0MOBQAaZ_VQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to