Method Bucket
Bucket<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)
Creates a $bucket stage.
public static PipelineStageDefinition<TInput, AggregateBucketResult<TValue>> Bucket<TInput, TValue>(AggregateExpressionDefinition<TInput, TValue> groupBy, IEnumerable<TValue> boundaries, AggregateBucketOptions<TValue> options = null)
Parameters
groupBy
AggregateExpression <TInput, TValue>Definition The group by expression.
boundaries
IEnumerable<TValue>The boundaries.
options
AggregateBucket <TValue>Options The options.
Returns
- Pipeline
Stage <TInput, AggregateDefinition Bucket <TValue>>Result The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The type of the values.
Bucket<TInput, TValue, TOutput>(AggregateExpressionDefinition<TInput, TValue>, IEnumerable<TValue>, ProjectionDefinition<TInput, TOutput>, AggregateBucketOptions<TValue>)
Creates a $bucket stage.
public static PipelineStageDefinition<TInput, TOutput> Bucket<TInput, TValue, TOutput>(AggregateExpressionDefinition<TInput, TValue> groupBy, IEnumerable<TValue> boundaries, ProjectionDefinition<TInput, TOutput> output, AggregateBucketOptions<TValue> options = null)
Parameters
groupBy
AggregateExpression <TInput, TValue>Definition The group by expression.
boundaries
IEnumerable<TValue>The boundaries.
output
ProjectionDefinition <TInput, TOutput>The output projection.
options
AggregateBucket <TValue>Options The options.
Returns
- Pipeline
Stage <TInput, TOutput>Definition The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The type of the values.
TOutput
The type of the output documents.
Bucket<TInput, TValue>(Expression<Func<TInput, TValue>>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)
Creates a $bucket stage.
public static PipelineStageDefinition<TInput, AggregateBucketResult<TValue>> Bucket<TInput, TValue>(Expression<Func<TInput, TValue>> groupBy, IEnumerable<TValue> boundaries, AggregateBucketOptions<TValue> options = null)
Parameters
groupBy
Expression<Func<TInput, TValue>>The group by expression.
boundaries
IEnumerable<TValue>The boundaries.
options
AggregateBucket <TValue>Options The options.
Returns
- Pipeline
Stage <TInput, AggregateDefinition Bucket <TValue>>Result The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The type of the values.
Bucket<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, IEnumerable<TValue>, Expression<Func<IGrouping<TValue, TInput>, TOutput>>, AggregateBucketOptions<TValue>)
Creates a $bucket stage.
public static PipelineStageDefinition<TInput, TOutput> Bucket<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>> groupBy, IEnumerable<TValue> boundaries, Expression<Func<IGrouping<TValue, TInput>, TOutput>> output, AggregateBucketOptions<TValue> options = null)
Parameters
groupBy
Expression<Func<TInput, TValue>>The group by expression.
boundaries
IEnumerable<TValue>The boundaries.
output
Expression<Func<IGrouping<TValue, TInput>, TOutput>>The output projection.
options
AggregateBucket <TValue>Options The options.
Returns
- Pipeline
Stage <TInput, TOutput>Definition The stage.
Type Parameters
TInput
The type of the input documents.
TValue
The type of the values.
TOutput
The type of the output documents.