1

我有来自设备的传感器数据。好像: [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]

每个数据中还有时间戳字段,我准备将它们存储到elasticsearch,我有2个要求

1.查询不同状态的温度表并进行分页 [status:1,temperature[20,21,21,21]] [status:2,temperature[5,5,5]] [status:1,temperature[21,21]]

  1. 查询日平均温度 avgTemperature(date)

有没有合适的方法将这些数据存储在es中?或者提供一些关于这个案例的建议。

4

0 回答 0