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
AggregateExpression <TIntermediate, TValue>Definition The group by expression.
buckets
intThe number of buckets.
options
AggregateBucket Auto Options The options.
Returns
- Pipeline
Definition <TInput, AggregateBucket <TValue>>Auto Result 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
AggregateExpression <TIntermediate, TValue>Definition The group by expression.
buckets
intThe number of buckets.
output
ProjectionDefinition <TIntermediate, TOutput>The output projection.
options
AggregateBucket Auto Options The options.
Returns
- Pipeline
Definition <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)
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)
Parameters
pipeline
PipelineDefinition <TInput, TIntermediate>The pipeline.
groupBy
Expression<Func<TIntermediate, TValue>>The group by expression.
buckets
intThe number of buckets.
options
AggregateBucket Auto Options The options (optional).
Returns
- Pipeline
Definition <TInput, AggregateBucket <TValue>>Auto Result 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)
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)
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<AggregateBucket <TValue>, TIntermediate>, TOutput>>Auto Result Id The output projection.
options
AggregateBucket Auto Options The options (optional).
Returns
- Pipeline
Definition <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.