Can i use derived value in histogram aggregation?


(Vaibhav Goel) #1

GET urza/order/_search
{
"size": 0,
"aggs": {
"by_user": {
"terms": {
"field": "userId.keyword"
},
"aggs": {
"total_cost": {
"sum": {
"field": "subtotalPrice"
}
}
}
}
}
}

Now i want to apply histogram aggregation on total cost, Is this possible ??


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.