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

XMLWordPrintableJSON

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

      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:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Nicholas Zolnierz
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated: