| Steps To Reproduce: |
> db.weather.drop()
|
false
|
> db.createCollection( "weather", { timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "hours" } } )
|
{ "ok" : 1 }
|
> db.weather.insertMany( [ { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("2105-06-24T06:28:16Z"), "temp": 12 }])
|
{
|
"acknowledged" : true,
|
"insertedIds" : [
|
ObjectId("628d0c27231ed7a35f109c7f")
|
]
|
}
|
> db.weather.insertMany( [ { "metadata": { "sensorId": 5578, "type": "temperature" }, "timestamp": ISODate("1969-05-18T00:00:00.000Z"), "temp": 12 }])
|
{
|
"acknowledged" : true,
|
"insertedIds" : [
|
ObjectId("628d0c31231ed7a35f109c81")
|
]
|
}
|
> db.system.buckets.weather.find()
|
{ "_id" : ObjectId("fed30f004d9e3cfa51f88755"), "control" : { "version" : 1, "min" : { "_id" : ObjectId("628d0c27231ed7a35f109c7f"), "timestamp" : ISODate("1969-05-18T00:00:00Z"), "temp" : 12 }, "max" : { "_id" : ObjectId("628d0c31231ed7a35f109c81"), "timestamp" : ISODate("2105-06-24T06:28:16Z"), "temp" : 12 } }, "meta" : { "sensorId" : 5578, "type" : "temperature" }, "data" : { "_id" : { "0" : ObjectId("628d0c27231ed7a35f109c7f"), "1" : ObjectId("628d0c31231ed7a35f109c81") }, "timestamp" : { "0" : ISODate("2105-06-24T06:28:16Z"), "1" : ISODate("1969-05-18T00:00:00Z") }, "temp" : { "0" : 12, "1" : 12 } } }
|
>
|
|