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

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

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • Query Optimization

    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

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            karel291180@gmail.com Mattia Borini
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated: