Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
None
-
None
-
Not Needed
Description
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