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
Fix multi-value handling in composite agg #88638
Conversation
Hi @ywelsch, I've created a changelog YAML for you. |
for (int i = 0; i < num; i++) { | ||
currentValue = dvs.nextValue(); | ||
missingCurrentValue = false; | ||
next.collect(doc, bucket); | ||
if (i == 0 || previous != currentValue) { |
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.
NumericTermsAggregator
implements the same "set" semantics here.
Pinging @elastic/es-analytics-geo (Team:Analytics) |
@elasticsearchmachine run elasticsearch-ci/part-1 |
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.
👍 Aggs shouldn't collect twice for two values that fall into the same bucket.
Thanks @nik9000!!!! |
Multi-valued number fields are handled differently by the composite terms agg in comparison to the regular terms agg. In particular, we use set semantics when grouping on multi-valued numeric fields using terms / multi-terms aggs while we don't do the same for composite terms aggs. This commit fixes composite aggs to use the same set semantics as well.
Multi-valued number fields are handled differently by the composite terms agg in comparison to the regular terms agg. In particular, we use set semantics when grouping on multi-valued numeric fields using terms / multi-terms aggs while we don't do the same for composite terms aggs. This commit fixes composite aggs to use the same set semantics as well.
Multi-valued number fields are handled differently by the composite terms agg in comparison to the regular terms agg. In particular, we use set semantics when grouping on multi-valued numeric fields using terms / multi-terms aggs (see e.g.
elasticsearch/server/src/main/java/org/elasticsearch/search/aggregations/bucket/terms/NumericTermsAggregator.java
Line 96 in d1ba276
which yields
Relates #88598