Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12824

Incorrect function on new Materialized View documentation page.

    XMLWordPrintable

    Details

    • Type: Typo
    • Status: Resolved
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 4.2.0-rc0
    • Fix Version/s: None
    • Component/s: Rel Notes
    • Labels:
    • Last comment by Customer:
      true

      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.)

        Attachments

          Activity

            People

            Assignee:
            kay.kim Kay Kim (Inactive)
            Reporter:
            jneedham@travelers.com Jeff Needham
            Participants:
            Last commenter:
            Kay Kim Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              1 year, 46 weeks ago
              Date of 1st Reply: