Click or drag to resize

AggregateFluentBase<TResult>.Bucket<TValue> Method (AggregateExpressionDefinition<TResult, TValue>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)

Appends a $bucket stage to the pipeline.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver (in MongoDB.Driver.dll) Version: 2.20.0+ee01960089f28ea1b501690df5fc9f6318a70242
Syntax
public virtual IAggregateFluent<AggregateBucketResult<TValue>> Bucket<TValue>(
	AggregateExpressionDefinition<TResult, TValue> groupBy,
	IEnumerable<TValue> boundaries,
	AggregateBucketOptions<TValue> options = null
)

Parameters

groupBy
Type: MongoDB.Driver.AggregateExpressionDefinition<TResult, TValue>
The expression providing the value to group by.
boundaries
Type: System.Collections.Generic.IEnumerable<TValue>
The bucket boundaries.
options (Optional)
Type: MongoDB.Driver.AggregateBucketOptions<TValue>
The options.

Type Parameters

TValue
The type of the value.

Return Value

Type: IAggregateFluent<AggregateBucketResult<TValue>>
The fluent aggregate interface.

Implements

IAggregateFluent<TResult>.Bucket<TValue>(AggregateExpressionDefinition<TResult, TValue>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)
See Also