Hi,
Is there a way to directly refer the doc_count of date histogram(over time_millis
field) bucket(s) in MovingFunctions.ewma bucket path
, instead of creating a separate value_count aggregation (for the same field time_millis
)?
Sample Query:
{
"explain": false,
"size": 0,
"aggregations": {
"time_millis_histogram": {
"date_histogram": {
"field": "time_millis",
"offset": 0,
"interval": "1m",
"keyed": false,
"min_doc_count": 1,
"order": {
"_key": "asc"
}
},
"aggregations": {
"time_value_count": {
"value_count": {
"field": "time_millis"
}
},
"ewma": {
"moving_fn": {
"**buckets_path**": "time_value_count",
"window": 10,
"script": "MovingFunctions.ewma(values, 0.3)"
}
}
}
}
}
}
Sample Response: