documentdb-lumenize
documentdb-lumenize copied to clipboard
Porting from MongoDB to DocumentDB
Hi Larry,
I am in the process of porting from MongoDB to DocumentDB, I came across lumenize. How could we write this aggregate expression in lumenize?
{ $match:{$and:[{"Id":"A99999999"}, {$or:[ {$and:[{'dw.f':null}, {T1:{'$lt':1415923200000}} ]}, {$and:[{'dw.f':null}, {T1:{"$gte":1415923200000, "$lte":1416009599999}} ]} ]} ]}}, { $group:{_id: {Id:"$Id", dt:{$subtract:[{$add:["$T1",-19800000]},{$mod:[{$add:["$T1",-19800000]},86400000]}]}}, td:{$sum:"$Dis"} }}