kmongo / org.litote.kmongo / sample

sample

fun sample(size: Int): Bson (source)

Creates a $sample pipeline stage with the specified sample size

Parameters

size - the sample size

Return
the $sample pipeline stage

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