marcus
unread,Nov 1, 2009, 7:49:29 PM11/1/09Sign 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
Is it possible to pass arguments to the map function in a mapreduce
call?
Something like this does not work for me:
> results = db.runCommand({mapreduce: "things", map:m('dog'),reduce:r});
undefined
Sun Nov 1 18:44:12 JS Error: TypeError: str has no properties (shell):
3
> results = db.runCommand({mapreduce: "things", map:m,reduce:r});
{
"result" : "tmp.mr.things_1257122656_17",
"timeMillis" : 34,
"counts" : {
"input" : 3,
"emit" : 2,
"output" : 2
},
"ok" : 1
}
Thanks,
Marcus