Collect the group's members, optionally ordered by order and capped to limit per group.
Opt-in — groups carry no members unless this aggregate is declared.
order is this aggregate's own per-group ordering — independent of any orderBy elsewhere in
the query, which orders the whole input stream (and, following aggregate, the resulting
groups), not this aggregate's member selection. Without order, members keep whatever order
they arrived in from a preceding orderBy (unspecified if there is none), so a per-group
top-limit moved position in the chain would silently change; declaring order here makes the
ordering explicit and local to this aggregate regardless of where it sits.
Collect the group's members, optionally ordered by
orderand capped tolimitper group. Opt-in — groups carry no members unless this aggregate is declared.orderis this aggregate's own per-group ordering — independent of anyorderByelsewhere in the query, which orders the whole input stream (and, followingaggregate, the resulting groups), not this aggregate's member selection. Withoutorder, members keep whatever order they arrived in from a precedingorderBy(unspecified if there is none), so a per-group top-limitmoved position in the chain would silently change; declaringorderhere makes the ordering explicit and local to this aggregate regardless of where it sits.