我通过post_id尝试分组并与dt匹配但是组不起作用。
AggregateIterable output = collection.aggregate(Collections.singletonList(Document.parse(
"{$match : {dt : {$gte: 1528787014130,$lt:1528787054130 }}}," +
"{$group : { _id : '$post_id' ,avg : {$avg : '$duration'}, max :{$max" +
" : '$duration'},min :{$min : '$duration'}}}}")));
如何让$ group工作