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

Investigate changes in SERVER-42421: Plug in BSON -> ProjectionAST parser to find command path

      Description

      Downstream Change Summary

      There were a number of small changes to the projection language made by this ticket:

      1) Projecting on top-level dollar prefixed fields in find() is now banned, with a few exceptions ($sortKey, $recordId, for example) that are for internal use by mongos.
      Example:

      db.c.find({a: 1}, {$foobar: 1}) // Now illegal
      

      2) Performing a projection on a field that also has the $slice expression applied to it is illegal.
      Example:

      db.c.find({}, {“comments”: {$slice: 1}, “comments.id”: 1}) // Illegal
      

      3) $slice may not be used with positional projection on the same field.
      Example:

      db.c.find({"x.a": 1}, {"x.$": {$slice: -1}}) // Illegal
      

      4) It is now illegal to project an empty field name

      Description of Linked Ticket

      null

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

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

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 48 weeks ago