group

fun <TExpression> group(id: TExpression, vararg fieldAccumulators: BsonField): Bson
fun <TExpression> group(id: TExpression, fieldAccumulators: List<BsonField>): Bson

Creates a $group pipeline stage for the specified filter

Return

the $group pipeline stage

Parameters

the expression type
id

the id expression for the group

fieldAccumulators

zero or more field accumulator pairs