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
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
groupBy
AggregateExpressionDefinition<TIntermediate, TValue>The group by expression.
buckets
intThe number of buckets.
options
AggregateBucketAutoOptionsThe options.
Returns
- PipelineDefinition<TInput, AggregateBucketAutoResult<TValue>>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The 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
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
groupBy
AggregateExpressionDefinition<TIntermediate, TValue>The group by expression.
buckets
intThe number of buckets.
output
ProjectionDefinition<TIntermediate, TOutput>The output projection.
options
AggregateBucketAutoOptionsThe options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The type of the values.
TOutput
The 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
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
groupBy
Expression<Func<TIntermediate, TValue>>The group by expression.
buckets
intThe number of buckets.
options
AggregateBucketAutoOptionsThe options (optional).
translationOptions
ExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, AggregateBucketAutoResult<TValue>>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The 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
pipeline
PipelineDefinition<TInput, TIntermediate>The pipeline.
groupBy
Expression<Func<TIntermediate, TValue>>The group by expression.
buckets
intThe number of buckets.
output
Expression<Func<IGrouping<AggregateBucketAutoResultId<TValue>, TIntermediate>, TOutput>>The output projection.
options
AggregateBucketAutoOptionsThe options (optional).
translationOptions
ExpressionTranslationOptionsThe translation options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInput
The type of the input documents.
TIntermediate
The type of the intermediate documents.
TValue
The type of the value.
TOutput
The type of the output documents.