percentile
fun <InExpression, PExpression> percentile(property: KProperty<*>, inExpression: InExpression, pExpression: PExpression, method: QuantileMethod): BsonField
Returns a combination of a computed field and an accumulator that generates a BSON {@link org.bson.BsonType#ARRAY Array} containing computed values from the given {@code inExpression} based on the provided {@code pExpression}, which represents an array of percentiles of interest within a group, where each element is a numeric value between 0.0 and 1.0 (inclusive).
Return
The requested {@link BsonField}. @mongodb.driver.manual reference/operator/aggregation/percentile/ $percentile @mongodb.server.release 7.0
Parameters
property
The data class property computed by the accumulator.
in Expression
The input expression.
p Expression
The expression representing a percentiles of interest.
method
The method to be used for computing the percentiles.