Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for shard_size for terms & terms_stats facets #648

Closed
darkwish121 opened this issue Jul 9, 2014 · 4 comments
Closed

Add support for shard_size for terms & terms_stats facets #648

darkwish121 opened this issue Jul 9, 2014 · 4 comments

Comments

@darkwish121
Copy link

The higher the requested size is, the more accurate the results will be, but also, the more expensive it will be to compute the final results (both due to bigger priority queues that are managed on a shard level and due to bigger data transfers between the nodes and the client). In an attempt to minimize the extra work that comes with bigger requested size the shard_size parameter was introduced. When defined, it will determine how many terms the coordinating node will request from each shard. Once all the shards responded, the coordinating node will then reduce them to a final result which will be based on the size parameter - this way, one can increase the accuracy of the returned terms and avoid the overhead of streaming a big list of terms back to the client.

Note that shard_size cannot be smaller than size… if that’s the case elasticsearch will override it and reset it to be equal to size

@ruflin
Copy link
Owner

ruflin commented Jul 10, 2014

Does this only apply to Terms & Terms_stats facets or also to other?

Here for more details on the size and shard_size for Terms Facet: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-facet.html

@darkwish121
Copy link
Author

Yes this is only apply to terms facet and terms stats facet

On Thu, Jul 10, 2014 at 3:45 PM, Nicolas Ruflin notifications@github.com
wrote:

Does this only apply to Terms & Terms_stats facets or also to other?

Here for more details on the size and shard_size for Terms Facet:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-facets-terms-facet.html


Reply to this email directly or view it on GitHub
#648 (comment).

@ruflin
Copy link
Owner

ruflin commented Jul 11, 2014

@darkwish121 Any time to open a pull request?

@im-denisenko
Copy link
Contributor

Wontfix due to #855.

@darkwish121 Use $facet->setParam('shard_size', $size); instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants