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
Lower the initial sizing of sub aggregations. #5994
Conversation
We currently compute initial sizings based on the cardinality of our fields. This can be highly exagerated for sub aggregations, for example if there is a parent terms aggregation that is executed over a field that has a very long tail: most buckets will only collect a couple of documents. Close elastic#5994
@@ -25,6 +26,16 @@ | |||
*/ | |||
public abstract class AggregatorFactory { | |||
|
|||
protected static boolean hasParentBucketAggregator(Aggregator parent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't feel like it belongs to the factory... why not put it in the Aggregator class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This utility method is only useful to factories though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting it on the Aggregator class would require to make it public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any problem with making it public
@uboness I just pushed a new commit to address your comments |
LGTM! |
We currently compute initial sizings based on the cardinality of our fields. This can be highly exagerated for sub aggregations, for example if there is a parent terms aggregation that is executed over a field that has a very long tail: most buckets will only collect a couple of documents. Close #5994
We currently compute initial sizings based on the cardinality of our fields.
This can be highly exagerated for sub aggregations, for example if there is a
parent terms aggregation that is executed over a field that has a very long
tail: most buckets will only collect a couple of documents.