This is the query I made using Kibana:
GET sensor-data/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"devId.keyword": {
"value": "a8404143e1877ae1"
}
}
},
{
"range": {
"timestamp": {
"gte": "2023-06-28T11:21:00.447Z",
"lte": "2023-06-28T11:22:19.447Z"
}
}
}
]
}
},
"aggs": {
"max": {
"max": {
"field": "data.EnergyMeterV1.u1.v"
}
}
}
}
This is the response I get from elasticsearch:
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 3,
"successful" : 3,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 1,
"relation" : "eq"
},
"max_score" : 5.491925,
"hits" : [
{
"_index" : "sensor-data",
"_type" : "_doc",
"_id" : "c0C8AYkBNIM9Q_24x62m",
"_score" : 5.491925,
"_source" : {
"$sRef" : "DeviceMetricV1",
"devId" : "a8404143e1877ae1",
"timestamp" : "2023-06-28T11:21:31.390Z",
"data" : {
"EnergyMeterV1" : {
"$sRef" : "EnergyMeterV1",
"u1" : {
"v" : 234.897,
"u" : "V"
}
}
}
}
}
]
},
"aggregations" : {
"max" : {
"value" : 234.0
}
}
}
Notice in hits section that for the query I made, for a very short time interval, there is only one document with value 234.897.
Question: How can I make aggregations to include the value as it is and not truncated from 234.897 to 234.0?