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
groupByAggregateExpressionDefinition<TInput, TValue>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
optionsAggregateBucketOptions<TValue>The options.
Returns
- PipelineStageDefinition<TInput, AggregateBucketResult<TValue>>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe 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
groupByAggregateExpressionDefinition<TInput, TValue>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
outputProjectionDefinition<TInput, TOutput>The output projection.
optionsAggregateBucketOptions<TValue>The options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe type of the values.
TOutputThe type of the output documents.
Bucket<TInput, TValue>(Expression<Func<TInput, TValue>>, IEnumerable<TValue>, AggregateBucketOptions<TValue>, ExpressionTranslationOptions)
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, ExpressionTranslationOptions translationOptions = null)
Parameters
groupByExpression<Func<TInput, TValue>>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
optionsAggregateBucketOptions<TValue>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineStageDefinition<TInput, AggregateBucketResult<TValue>>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe type of the values.
Bucket<TInput, TValue, TOutput>(Expression<Func<TInput, TValue>>, IEnumerable<TValue>, Expression<Func<IGrouping<TValue, TInput>, TOutput>>, AggregateBucketOptions<TValue>, ExpressionTranslationOptions)
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, ExpressionTranslationOptions translationOptions = null)
Parameters
groupByExpression<Func<TInput, TValue>>The group by expression.
boundariesIEnumerable<TValue>The boundaries.
outputExpression<Func<IGrouping<TValue, TInput>, TOutput>>The output projection.
optionsAggregateBucketOptions<TValue>The options.
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineStageDefinition<TInput, TOutput>
The stage.
Type Parameters
TInputThe type of the input documents.
TValueThe type of the values.
TOutputThe type of the output documents.