-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[ML] Support single bucket aggregations in datafeeds #36838
Copy link
Copy link
Closed
Labels
Description
This use case was described in the discuss forum Referencing field name from datafeed aggregation to use as a detector in an ML job
where it is desired to use a filter aggregation in the datafeed.
"aggs": {
"metric1":{
"filter":{"term":{"my_filter_field":"A"}},
"aggs":{
"metric1_value":{"value_count":{"field":"my_filter_field"}}
}
}
The canonical example in the docs is
"aggs" : {
"t_shirts" : {
"filter" : { "term": { "type": "t-shirt" } },
"aggs" : {
"avg_price" : { "avg" : { "field" : "price" } }
}
}
}
The solution is to find single bucket value aggs in AggregationToJsonProcessor and handle them as if they were leaf node aggregations.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.