Skip to content

Commit 5e4455f

Browse files
jason-price-mongodbjeff-allen-mongo
authored andcommitted
DOCSP-15835 Bucket operator updates
1 parent 78068d9 commit 5e4455f

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed
Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
Available for use in the :pipeline:`$group` stage, accumulators are
2-
operators that maintain their state (e.g. totals, maximums, minimums,
3-
and related data) as documents progress through the pipeline.
1+
Aggregation accumulator operators:
42

5-
When used as accumulators in the :pipeline:`$group` stage, these
6-
operators take as input a single expression, evaluating the expression
7-
once for each input document, and maintain their stage for the group of
8-
documents that share the same group key.
3+
- Maintain their state as documents progress through the aggregation
4+
pipeline.
95

6+
- Return totals, maxima, minima, and other values.
7+
8+
- Can be used in these aggregation pipeline stages:
9+
10+
- :pipeline:`$group`
11+
12+
- :pipeline:`$bucket`
13+
14+
- :pipeline:`$bucketAuto`
15+
16+
- :pipeline:`$setWindowFields` starting in MongoDB 5.0 (except when
17+
you are using the :group:`$accumulator` or
18+
:expression:`$mergeObjects` operators, which cannot be used with
19+
:pipeline:`$setWindowFields`)

source/meta/aggregation-quick-reference.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ Type Expression Operators
300300

301301
.. _agg-quick-reference-accumulators:
302302

303-
Accumulators (``$group``)
304-
~~~~~~~~~~~~~~~~~~~~~~~~~~
303+
Accumulators (``$group, $bucket, $bucketAuto, $setWindowFields``)
304+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
305305

306306
.. include:: /includes/intro-aggregation-accumulator.rst
307307

source/reference/operator/aggregation.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ Type Expression Operators
114114

115115
.. _agg-operators-group-accumulators:
116116

117-
Accumulators (``$group``)
118-
~~~~~~~~~~~~~~~~~~~~~~~~~~
117+
Accumulators (``$group, $bucket, $bucketAuto, $setWindowFields``)
118+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
119119

120120
.. include:: /includes/intro-aggregation-accumulator.rst
121121

0 commit comments

Comments
 (0)