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

Docs for $lookup implies that 'let' variables are only accessible in a $expr

      Description

      If you go down to the 'let' section of the docs it says

      To access the let variables in the pipeline, use the $expr operator.

      This is only true inside $match. Other stages can use the let variable as part of any expression.

      It would be better worded as something like:

      Any stage in the pipeline can access the variable using the $$var syntax, except for $match, where it can only be accessed inside a $expr

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

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

            Assignee:
            jeffrey.allen@mongodb.com Jeffrey Allen
            Reporter:
            vlad.rachev@mongodb.com Vlad Rachev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              4 years, 11 weeks ago