kmongo / org.litote.kmongo / bucket

bucket

fun <TExpression, Boundary> bucket(groupBy: TExpression, boundaries: List<Boundary>, options: BucketOptions = BucketOptions()): Bson (source)

Creates a $bucket pipeline stage

Parameters

groupBy - the criteria to group By

boundaries - the boundaries of the buckets

options - the optional values for the $bucket stage

Parameters

Parameters

Return
the $bucket pipeline stage

Mongodb
.driver.manual reference/operator/aggregation/bucket/ $bucket