[DOCS-12824] Incorrect function on new Materialized View documentation page. Created: 24/Jun/19  Updated: 29/Oct/23  Resolved: 24/Jun/19

Status: Closed
Project: Documentation
Component/s: Rel Notes
Affects Version/s: 4.2.0-rc0
Fix Version/s: None

Type: Typo Priority: Minor - P4
Reporter: Jeff Needham Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: docs-triage
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File replaceWithNew.JPG    
Participants:
Days since reply: 4 years, 33 weeks, 2 days ago

 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:

{ $gte: startDate }

} },
{ $group: { _id: { $dateToString:

{ format: "%Y-%m", date: "$date" }

}, sales_quantity: { $sum: "$quantity"}, sales_amount: { $sum: "$amount" } } },
{ $merge: { into: "monthlybakesales", whenMatched: "replaceWithNew" } }
] );
};

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Kay Kim (Inactive) [ 24/Jun/19 ]

Thanks for flagging.  Should be fixed.  May need to hard refresh the page to see the update.

Comment by Githook User [ 24/Jun/19 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-12824: mat view replaceWithNew -> replace
Branch: master
https://github.com/mongodb/docs/commit/a8c2c5c0c66574c8aa9b1a4731db16518290f7a2

Generated at Thu Feb 08 08:06:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.