jamesKim
unread,Mar 8, 2012, 11:35:23 PM3/8/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
what is different between mapReduce and aggregation function?
my example
1.aggregation group function
db.pageviews.group(
{
key: {'user.agent': true},
initial: {sum: 0},
reduce: function(doc, prev) { prev.sum += 1}
});
2.using mapreduce
db.runCommand({mapreduce:"pageviews",......)
when i wanna get a sum propertie. is it different 1. and 2.?