Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30365

How to exclude (sub)fields starting with $ in a query projection

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: Querying

      Description

      I'm querying the oplog.rs collection and I would like to exclude the o.$set field from the results. The 'o.$set': 0 projection gives an error:

      "Cannot exclude array elements with the positional operator."

      There doesn't seem to be other ways to exclude it. Am I wrong? Is it possible?

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: