mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Aggregations: Throw error if cardinality aggregator has a sub aggregation
The cardinality aggregation is a metric aggregation and therefore cannot accept sub-aggregations. It was previously possible to create a rest request with a cardinality aggregation that had sub-aggregations. Now such a request will throw an error in the response. Close #12988
This commit is contained in:
parent
ca28acc373
commit
88d482437a
@ -31,7 +31,7 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
final class CardinalityAggregatorFactory extends ValuesSourceAggregatorFactory<ValuesSource> {
|
||||
final class CardinalityAggregatorFactory extends ValuesSourceAggregatorFactory.LeafOnly<ValuesSource> {
|
||||
|
||||
private final long precisionThreshold;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user