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

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

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

      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:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            karel291180@gmail.com Mattia Borini
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: