Skip to content

Commit f5f8cc5

Browse files
DOCSP-10258 window functions
1 parent a09e888 commit f5f8cc5

File tree

8 files changed

+21
-107
lines changed

8 files changed

+21
-107
lines changed

source/reference/operator/aggregation.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,15 +1132,11 @@ Alphabetical Listing of Expression Operators
11321132
/reference/operator/aggregation/convert
11331133
/reference/operator/aggregation/cos
11341134
/reference/operator/aggregation/cosh
1135-
<<<<<<< HEAD
1136-
/reference/operator/aggregation/count-accum
1137-
/reference/operator/aggregation/dateAdd
1138-
/reference/operator/aggregation/dateDiff
1139-
=======
11401135
/reference/operator/aggregation/count-accumulator
11411136
/reference/operator/aggregation/covariancePop
11421137
/reference/operator/aggregation/covarianceSamp
1143-
>>>>>>> f7253052c... DOCSP-10258 window functions
1138+
/reference/operator/aggregation/dateAdd
1139+
/reference/operator/aggregation/dateDiff
11441140
/reference/operator/aggregation/dateFromParts
11451141
/reference/operator/aggregation/dateSubtract
11461142
/reference/operator/aggregation/dateToParts

source/reference/operator/aggregation/count-accum.txt

Lines changed: 0 additions & 89 deletions
This file was deleted.

source/reference/operator/aggregation/count-accumulator.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ Definition
1919

2020
Returns the number of documents.
2121

22-
.. admonition:: Disambiguation
23-
:class: note
22+
.. note:: Disambiguation
2423

2524
This page describes the ``$count`` aggregation accumulator. For the
2625
``$count`` aggregation pipeline stage, see :pipeline:`$count
@@ -47,6 +46,16 @@ Returns the number of documents.
4746

4847
:group:`$count` does not accept any parameters.
4948

49+
Behavior
50+
--------
51+
52+
:group:`$count` is functionally equivalent to using ``{ $sum : 1 }``
53+
within the :pipeline:`$group` stage.
54+
55+
.. seealso::
56+
57+
:group:`$sum`
58+
5059
Examples
5160
--------
5261

source/reference/operator/aggregation/count.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ Definition
2020
Passes a document to the next stage that contains a count of the
2121
number of documents input to the stage.
2222

23-
.. admonition:: Disambiguation
24-
:class: note
23+
.. note:: Disambiguation
2524

2625
This page describes the ``$count`` aggregation pipeline stage.
2726
For the ``$count`` aggregation accumulator, see :group:`$count

source/reference/operator/aggregation/first.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ documents. Only meaningful when documents are in a defined order.
2323

2424
.. include:: /includes/extracts/fact-aggregation-accumulator-first.rst
2525

26-
.. admonition:: Disambiguation
27-
:class: note
26+
.. note:: Disambiguation
2827

2928
This page describes the :group:`$first` aggregation accumulator. For
3029
the :expression:`$first` array operator, see :expression:`$first

source/reference/operator/aggregation/integral.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ documents forming a trapezoid using the:
5959
Specifies the :ref:`expression <aggregation-expressions>` to
6060
evaluate. You must provide an expression that returns a number.
6161

62-
* - :ref:`unit <integral-outputUnit>`
62+
* - :ref:`unit <integral-unit>`
6363

64-
- .. _integral-outputUnit:
64+
- .. _integral-unit:
6565

6666
.. include:: /includes/outputUnit-behavior.rst
6767

source/reference/operator/aggregation/last.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Only meaningful when documents are in a defined order.
2323

2424
.. include:: /includes/extracts/fact-aggregation-accumulator-last.rst
2525

26-
.. admonition:: Disambiguation
27-
:class: note
26+
.. note:: Disambiguation
2827

2928
This page describes the :group:`$last` aggregation accumulator. For
3029
the :expression:`$last` array operator, see :expression:`$last (array

source/release-notes/5.0.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ MongoDB 5.0 introduces the following aggregation operators:
4040

4141
* - :group:`$count`
4242
- :group:`$count (aggregation accumulator) <$count>`
43-
provides a count of all documents when used in a
44-
:pipeline:`$group (aggregation) <$group>` pipeline stage.
43+
provides a count of all documents when used in the existing
44+
pipeline :pipeline:`$group (aggregation) <$group>` stage and the
45+
new MongoDB 5.0 :pipeline:`$setWindowFields` stage.
4546

4647
.. note:: Disambiguation
4748

0 commit comments

Comments
 (0)