Method BucketAuto
BucketAuto<TValue>(AggregateExpressionDefinition<TResult, TValue>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
IAggregateFluent<AggregateBucketAutoResult<TValue>> BucketAuto<TValue>(AggregateExpressionDefinition<TResult, TValue> groupBy, int buckets, AggregateBucketAutoOptions options = null)
Parameters
groupBy
AggregateExpression <TResult, TValue>Definition The expression providing the value to group by.
buckets
intThe number of buckets.
options
AggregateBucket Auto Options The options (optional).
Returns
- IAggregate
Fluent <AggregateBucket <TValue>>Auto Result The fluent aggregate interface.
Type Parameters
TValue
The type of the value.
BucketAuto<TValue, TNewResult>(AggregateExpressionDefinition<TResult, TValue>, int, ProjectionDefinition<TResult, TNewResult>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline with a custom projection.
IAggregateFluent<TNewResult> BucketAuto<TValue, TNewResult>(AggregateExpressionDefinition<TResult, TValue> groupBy, int buckets, ProjectionDefinition<TResult, TNewResult> output, AggregateBucketAutoOptions options = null)
Parameters
groupBy
AggregateExpression <TResult, TValue>Definition The expression providing the value to group by.
buckets
intThe number of buckets.
output
ProjectionDefinition <TResult, TNewResult>The output projection.
options
AggregateBucket Auto Options The options (optional).
Returns
- IAggregate
Fluent <TNewResult> The fluent aggregate interface.
Type Parameters
TValue
The type of the value.
TNewResult
The type of the new result.