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

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Optimization
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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?

            Assignee:
            [DO NOT USE] Backlog - Query Optimization
            Reporter:
            Mattia Borini
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: