I have sensor data from devices. looks like:
[status:1,temperature:20,date:20160101]
[status:1,temperature:21,date:20160101]
[status:1,temperature:21,date:20160101]
[status:1,temperature:21,date:20160101]
[status:2,temperature:5,date:20160101]
[status:2,temperature:5,date:20160101]
[status:2,temperature:5,date:20160101]
[status:1,temperature:21,date:20160101]
[status:1,temperature:21,date:20160101]
also there is timestamp field in each data, I prepare to storage them to elasticsearch, I have 2 requirements
-
query temperature list in different status and do the pagination
[status:1,temperature[20,21,21,21]]
[status:2,temperature[5,5,5]]
[status:1,temperature[21,21]] -
query average temperature per day avgTemperature(date)
is there any proper way to storage these data in es or need to change the data structure? pls provide some advices about this case.