Method Bucket
Bucket<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, IEnumerable<TValue>, AggregateBucketOptions<TValue>)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, AggregateBucketResult<TValue>> Bucket<TInput, TIntermediate, TValue>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TValue> groupBy, IEnumerable<TValue> boundaries, AggregateBucketOptions<TValue> options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByAggregateExpressionDefinition<TIntermediate, TValue>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
optionsAggregateBucketOptions<TValue>The options.
Returns
- PipelineDefinition<TInput, AggregateBucketResult<TValue>>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TValueThe type of the values.
Bucket<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, IEnumerable<TValue>, ProjectionDefinition<TIntermediate, TOutput>, AggregateBucketOptions<TValue>)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Bucket<TInput, TIntermediate, TValue, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TValue> groupBy, IEnumerable<TValue> boundaries, ProjectionDefinition<TIntermediate, TOutput> output, AggregateBucketOptions<TValue> options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByAggregateExpressionDefinition<TIntermediate, TValue>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
outputProjectionDefinition<TIntermediate, TOutput>The output projection.
optionsAggregateBucketOptions<TValue>The options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TValueThe type of the values.
TOutputThe type of the output documents.
Bucket<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, IEnumerable<TValue>, AggregateBucketOptions<TValue>, ExpressionTranslationOptions)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, AggregateBucketResult<TValue>> Bucket<TInput, TIntermediate, TValue>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TValue>> groupBy, IEnumerable<TValue> boundaries, AggregateBucketOptions<TValue> options = null, ExpressionTranslationOptions translationOptions = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByExpression<Func<TIntermediate, TValue>>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
optionsAggregateBucketOptions<TValue>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, AggregateBucketResult<TValue>>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TValueThe type of the values.
Bucket<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, IEnumerable<TValue>, Expression<Func<IGrouping<TValue, TIntermediate>, TOutput>>, AggregateBucketOptions<TValue>, ExpressionTranslationOptions)
Appends a $bucket stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> Bucket<TInput, TIntermediate, TValue, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TValue>> groupBy, IEnumerable<TValue> boundaries, Expression<Func<IGrouping<TValue, TIntermediate>, TOutput>> output, AggregateBucketOptions<TValue> options = null, ExpressionTranslationOptions translationOptions = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByExpression<Func<TIntermediate, TValue>>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
outputExpression<Func<IGrouping<TValue, TIntermediate>, TOutput>>The output projection.
optionsAggregateBucketOptions<TValue>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the input documents.
TIntermediateThe type of the intermediate documents.
TValueThe type of the values.
TOutputThe type of the output documents.