BucketAuto constructor
BucketAuto({
- required AggregationExpr groupBy,
- required int buckets,
- Map<
String, Accumulator> ? output, - Granularity? granularity,
Creates $bucketAuto
aggregation stage
groupBy
- An expression to group documents by. To specify a field path use Field object.buckets
- A positive integer that specifies the number of buckets into which input documents are grouped.output
- Optional. A document that specifies the fields to include in the output documents in addition to the_id
field. To specify the field to include, you must use accumulator expressionsgranularity
- Optional. A Granularity that specifies the preferred number series to use to ensure that the calculated boundary edges end on preferred round numbers or their powers of 10.
Implementation
BucketAuto(
{required AggregationExpr groupBy,
required int buckets,
Map<String, Accumulator>? output,
Granularity? granularity})
: super(
'bucketAuto',
AEObject({
'groupBy': groupBy,
'buckets': buckets,
if (output != null) 'output': AEObject(output),
if (granularity != null) 'granularity': granularity
}));