I have some documents that look like this
{
"reg": "a",
"timestamp": "2012-10-01T00:06:35+0000",
"data": [
{
"d": 33.2,
"name": "TEMP",
},
{
"d": 129,
"name": "PRESS",
}
]
}
Data is a nested array with 2 properties inside (name
and d
which is a double)
I want to aggregate the value (d
) of TEMP
to have buckets with mean values, for instance.
How can I do that? if I create a simple aggregation on data.d, the aggregation mixes PRESS
and TEMP
, that I do not want