Group members by a scalar property, or by the first property of a coalesce chain holding a
scalar value (threadId ?? id). The record key names the result field carrying the coerced
group-key value; multiple group entries form a composite key (a coalesce chain is one
component, not several). Members whose key is missing, null, undefined, or non-scalar group
under the null key, so the field value includes null.
A chain ending in an always-present property (e.g. { coalesce: ['threadId', 'id'] }) gives each
member lacking the leading property its own singleton group instead of pooling them under null,
where an itemslimit would truncate unrelated members. id qualifies: it resolves to
the object's entity id even though documents don't store it as data.
Group members by a scalar property, or by the first property of a
coalescechain holding a scalar value (threadId ?? id). The record key names the result field carrying the coerced group-key value; multiplegroupentries form a composite key (acoalescechain is one component, not several). Members whose key is missing,null,undefined, or non-scalar group under thenullkey, so the field value includesnull.A chain ending in an always-present property (e.g.
{ coalesce: ['threadId', 'id'] }) gives each member lacking the leading property its own singleton group instead of pooling them undernull, where an itemslimitwould truncate unrelated members.idqualifies: it resolves to the object's entity id even though documents don't store it as data.