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

Fixes scripted metrics aggregation when used as a sub aggregation #8037

Merged
merged 1 commit into from Oct 10, 2014
Merged

Fixes scripted metrics aggregation when used as a sub aggregation #8037

merged 1 commit into from Oct 10, 2014

Conversation

colings86
Copy link
Contributor

The scripted metric aggregation is now a PER_BUCKET aggregation so that parent buckets are evaluated independently. Also the params and reduceParams are copied for each instance of the aggregator (each parent bucket) so modifications to the values are kept only within the scope of its parent bucket

Closes #8036

@colings86 colings86 self-assigned this Oct 9, 2014
@@ -28,4 +28,7 @@
protected MetricsAggregator(String name, long estimatedBucketsCount, AggregationContext context, Aggregator parent) {
super(name, BucketAggregationMode.MULTI_BUCKETS, AggregatorFactories.EMPTY, estimatedBucketsCount, context, parent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this one call this instead of super now that there is a more generic constructor?

@jpountz
Copy link
Contributor

jpountz commented Oct 10, 2014

LGTM

…ggregation

The scripted metric aggregation is now a PER_BUCKET aggregation so that parent buckets are evaluated independently. Also the params and reduceParams are copied for each instance of the aggregator (each parent bucket) so modifications to the values are kept only within the scope of its parent bucket

Closes #8036
@colings86 colings86 merged commit e9f05ee into elastic:master Oct 10, 2014
@colings86 colings86 deleted the fix/7075 branch October 10, 2014 08:27
@diegoasth
Copy link

I am already using it. Thank you guys very much.

@jpountz jpountz removed the review label Oct 21, 2014
@clintongormley clintongormley changed the title Aggregations: Fixes scripted metrics aggregation when used as a sub aggregation Fixes scripted metrics aggregation when used as a sub aggregation Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aggregations: scripted metric agg does not separate parent buckets
4 participants