我正在使用 Cygnus 订阅 Orion Context Broker 数据。Cygnus 将数据存储在 MongoDB 上,如下所示。是否有可能将 attrValue 存储为float而不是 String 以便能够使用 Mongo 的聚合功能?
> db['cygnus_/kurapath_enocean_power_enocean'].find().pretty()
{
"_id" : ObjectId("55e81e9631d7791085668331"),
"recvTime" : ISODate("2015-09-03T10:19:02Z"),
"attrName" : "power",
"attrType" : "string",
"attrValue" : "2085.0"
}