Method BucketAuto
BucketAuto<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
public static PipelineDefinition<TInput, AggregateBucketAutoResult<TValue>> BucketAuto<TInput, TIntermediate, TValue>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TValue> groupBy, int buckets, AggregateBucketAutoOptions options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByAggregateExpressionDefinition<TIntermediate, TValue>The group by expression.
bucketsintThe number of buckets.
optionsAggregateBucketAutoOptionsThe options.
Returns
- PipelineDefinition<TInput, AggregateBucketAutoResult<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.
BucketAuto<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, int, ProjectionDefinition<TIntermediate, TOutput>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> BucketAuto<TInput, TIntermediate, TValue, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, AggregateExpressionDefinition<TIntermediate, TValue> groupBy, int buckets, ProjectionDefinition<TIntermediate, TOutput> output, AggregateBucketAutoOptions options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByAggregateExpressionDefinition<TIntermediate, TValue>The group by expression.
bucketsintThe number of buckets.
outputProjectionDefinition<TIntermediate, TOutput>The output projection.
optionsAggregateBucketAutoOptionsThe 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.
BucketAuto<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, int, AggregateBucketAutoOptions, ExpressionTranslationOptions)
Appends a $bucketAuto stage to the pipeline.
public static PipelineDefinition<TInput, AggregateBucketAutoResult<TValue>> BucketAuto<TInput, TIntermediate, TValue>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TValue>> groupBy, int buckets, AggregateBucketAutoOptions options = null, ExpressionTranslationOptions translationOptions = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByExpression<Func<TIntermediate, TValue>>The group by expression.
bucketsintThe number of buckets.
optionsAggregateBucketAutoOptionsThe options (optional).
translationOptionsExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, AggregateBucketAutoResult<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 value.
BucketAuto<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TIntermediate>, TOutput>>, AggregateBucketAutoOptions, ExpressionTranslationOptions)
Appends a $bucketAuto stage to the pipeline (this overload can only be used with LINQ3).
public static PipelineDefinition<TInput, TOutput> BucketAuto<TInput, TIntermediate, TValue, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, Expression<Func<TIntermediate, TValue>> groupBy, int buckets, Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TIntermediate>, TOutput>> output, AggregateBucketAutoOptions options = null, ExpressionTranslationOptions translationOptions = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
groupByExpression<Func<TIntermediate, TValue>>The group by expression.
bucketsintThe number of buckets.
outputExpression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TIntermediate>, TOutput>>The output projection.
optionsAggregateBucketAutoOptionsThe options (optional).
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 value.
TOutputThe type of the output documents.