Details
-
Typo
-
Status: Closed
-
Minor - P4
-
Resolution: Fixed
-
4.2.0-rc0
-
None
Description
Description
The new Materialized View documentation page references a possibly-deprecated function.
https://docs.mongodb.com/master/core/materialized-views/
The Materialized View Definition example below will not allow the Perform Initial Run step to run against 4.2 server until 'replaceWithNew' is replaced with simply 'replace':
updateMonthlySales = function(startDate) {
db.bakesales.aggregate( [
{ $match: { date:
} },
{ $group: { _id: { $dateToString:
}, sales_quantity: { $sum: "$quantity"}, sales_amount: { $sum: "$amount" } } },
{ $merge: { into: "monthlybakesales", whenMatched: "replaceWithNew" } }
] );
};