I am experimenting with mongodb 1.6 and this thing is new to me.
I notice that if I shard a collection, and then do a mapReduce, mapReduce doesn't accept the argument scope anymore:
// some line in some example code...
res = db.data.mapReduce(m,r,{scope: {log : log, padZero: padZero}});
And I got an error like this: Mon Aug 09 18:10:08 uncaught exception: map reduce failed: { "assertion" : "don't know mr field: scope", "assertionCode" : 10177, "errmsg" : "db assertion failure", "ok" : 0 }
But it works if the collection is not sharded. (What is the usage of the word shard? :) ) Is it the expected behavior? And is there any way to sneak something into the scope?