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

Aggregation lookup example is not working on mongodb version: 4.0.2

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.2
    • Component/s: None
    • Labels:
    • Environment:
      Debian Jessie

      Description

      The example:

      https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#perform-a-single-equality-join-with-lookuphttps://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#pipe._S_lookup

      Gives a parsing error:

       Error: Printing Stack Trace
       at printStackTrace (src/mongo/shell/utils.js:37:15)
       at DBCollection.aggregate (src/mongo/shell/collection.js:897:9)
       at (shell):1:11
      Mon Sep 10 19:27:07.199 aggregate failed: {
       "ok" : 0,
       "errmsg" : "The 'cursor' option is required, except for aggregate with the explain argument",
       "code" : 9,
       "codeName" : "FailedToParse"
      } at src/mongo/shell/collection.js:898

      Is the documentation correct?

      I copied the example word for word after getting the same errors on a data structure I was creating myself.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

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

            Assignee:
            nick.larew@mongodb.com Nicholas Larew
            Reporter:
            jssoares Jorge Soares
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              5 years, 33 weeks, 3 days ago