-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Embedded Shell
-
None
-
Not Needed
Problem Statement/Rationale
The Mongo standard client will work seamlessly, however, the mongosh client will simply not transmit the scope to the server.
Steps to Reproduce
db.orders.mapReduce(
monthlyMapFunction,
reduceFunction,
{
query: {
createdAt: {
$gt: startDate,
$lte: endDate
}
},
scope: {
skus
},
out: { reduce: 'monthlyOrders' }
}
);
Expected Results
the `skus` variable should be available in both the map and the reduce functions (and, when necessary, in the finalize function).
Actual Results
The `skus` variable is 'null' or undefined.
Additional Notes
It works perfectly fine in the good old mongo client