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

Allow ranking-style window functions over a compound set of sortBy fields

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

      Ranking-style functions are currently only allowed with single-field sortBy specs, since the implementation re-uses existing accumulator machinery under the hood which operates over single values at a time.

      One potential workaround is to prepend an $addFields stage that places the compound set of fields into their own sub-object, then applying the window function rank on that new object.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: