Method BucketAuto
BucketAuto<TValue>(AggregateExpressionDefinition<TResult, TValue>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
public virtual IAggregateFluent<AggregateBucketAutoResult<TValue>> BucketAuto<TValue>(AggregateExpressionDefinition<TResult, TValue> groupBy, int buckets, AggregateBucketAutoOptions options = null)
Parameters
groupBy
AggregateExpressionDefinition<TResult, TValue>The expression providing the value to group by.
buckets
intThe number of buckets.
options
AggregateBucketAutoOptionsThe options (optional).
Returns
- IAggregateFluent<AggregateBucketAutoResult<TValue>>
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.
public virtual IAggregateFluent<TNewResult> BucketAuto<TValue, TNewResult>(AggregateExpressionDefinition<TResult, TValue> groupBy, int buckets, ProjectionDefinition<TResult, TNewResult> output, AggregateBucketAutoOptions options = null)
Parameters
groupBy
AggregateExpressionDefinition<TResult, TValue>The expression providing the value to group by.
buckets
intThe number of buckets.
output
ProjectionDefinition<TResult, TNewResult>The output projection.
options
AggregateBucketAutoOptionsThe options (optional).
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TValue
The type of the value.
TNewResult
The type of the new result.