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

Allow rewrite to produce only empty documents in $unpackBucket if it is followed by $count

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Querying
    • Fully Compatible
    • Query 2021-01-25, Query Optimization 2021-02-22, Query Optimization 2021-03-08, Query Optimization 2021-03-22

      We can achieve this by changing the arguments to:

      {include: []}

      This should be done inside $unpackBucket's doOptimizeAt() and coordinated with the rest of the code being called from there.

            Assignee:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Reporter:
            jacob.evans@mongodb.com Jacob Evans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: