You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to add map/reduce to the supported command sets.
I'd really like to be able to spam all the map/reduce commands in a single string.
m = function () { emit(this.field, 1);}; r = function (k, vals) {return Array.sum(vals);}; res = db.mycollection.mapReduce(m, r, { out : "temp_col1" }); db.temp_col1.find({value: {$gt: 1}}); db.temp_col1.drop();
It would be ok if the format weren't the same as the mongo shell, but required some special flags to define functions.
Would it be possible to add map/reduce to the supported command sets.
I'd really like to be able to spam all the map/reduce commands in a single string.
m = function () { emit(this.field, 1);}; r = function (k, vals) {return Array.sum(vals);}; res = db.mycollection.mapReduce(m, r, { out : "temp_col1" }); db.temp_col1.find({value: {$gt: 1}}); db.temp_col1.drop();
It would be ok if the format weren't the same as the mongo shell, but required some special flags to define functions.