I\'ve constructed the query I want in the shell but am having trouble writing it in Mongoose.
db.commentstreams.group({ key: { page_id: true }, reduce: function(
According to this post:
Model.find({}, [fields], {'group': 'FIELD'}, function(err, logs) { ... });
Unfortunately we seem to be lacking documentation for this one.