Skip to content

Commit fc66e3b

Browse files
authored
Docsp 19836 document max n min n (#161)
* DOCSP-19836 init * fix setwindowfield build errors * aggregation.txt build errors * * * Address Jeff changes #1 * Make aggregation.txt consistant with extracts-agg * Length of Comparison of maxN topN header corrected * Address Mihai Comments #1 * * * fix build error for sort and indents * Addres Mihai comments #2 * Adjust minimumThree scores bullet
1 parent 74d0791 commit fc66e3b

File tree

6 files changed

+674
-11
lines changed

6 files changed

+674
-11
lines changed

source/includes/extracts-agg-operators.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,17 @@ content: |
10931093
10941094
Available in :pipeline:`$setWindowFields` stage.
10951095
1096+
* - :group:`$maxN`
1097+
1098+
- Returns an aggregation of the ``n`` maximum valued elements in
1099+
a group.
1100+
1101+
.. versionadded:: 5.2
1102+
1103+
Available in :pipeline:`$group`,
1104+
:pipeline:`$setWindowFields`
1105+
and as an :ref:`expression <aggregation-expressions>`.
1106+
10961107
* - :expression:`$mergeObjects`
10971108
10981109
- Returns a document created by combining the input documents
@@ -1370,6 +1381,17 @@ content: |
13701381
13711382
Available in :pipeline:`$setWindowFields` stage.
13721383
1384+
* - :group:`$minN`
1385+
1386+
- Returns an aggregation of the ``n`` minimum valued elements in a
1387+
group.
1388+
1389+
.. versionadded:: 5.2
1390+
1391+
Available in :pipeline:`$group`,
1392+
:pipeline:`$setWindowFields`
1393+
and as an :ref:`expression <aggregation-expressions>`.
1394+
13731395
* - :group:`$push`
13741396
13751397
- Returns an array of values that result from applying an

source/includes/setWindowFields-operators.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ These operators can be used with the :pipeline:`$setWindowFields` stage:
33
.. _setWindowFields-accumulator-operators:
44

55
- Accumulator operators: :group:`$addToSet`, :group:`$avg`,
6-
:group:`$bottom`, :group:`$bottomN`, :group:`$count`,
7-
:group:`$covariancePop`, :group:`$covarianceSamp`, :group:`$derivative`,
8-
:group:`$expMovingAvg`, :group:`$integral`, :group:`$max`,
9-
:group:`$min`, :group:`$push`, :group:`$stdDevSamp`,
10-
:group:`$stdDevPop`, :group:`$sum`, :group:`$top`
11-
and :group:`$topN`.
6+
:group:`$bottomN`, :group:`$count`, :group:`$covariancePop`,
7+
:group:`$covarianceSamp`, :group:`$derivative`,
8+
:group:`$expMovingAvg`, :group:`$integral`, :group:`$max`, :group:`$maxN`,
9+
:group:`$min`, :group:`$minN`, :group:`$push`, :group:`$stdDevSamp`,
10+
:group:`$stdDevPop`, :group:`$sum` and :group:`$topN`.
1211

1312
.. _setWindowFields-gap-filling-operators:
1413

source/reference/operator/aggregation.txt

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,16 @@ Alphabetical Listing of Expression Operators
731731

732732
.. versionadded:: 5.2
733733

734+
* - :group:`$maxN`
735+
736+
- Returns an aggregation of the ``n`` maximum valued elements in a
737+
group.
738+
739+
.. versionadded:: 5.2
740+
741+
Available in :pipeline:`$group`,
742+
:pipeline:`$setWindowFields`
743+
and as an :ref:`expression <aggregation-expressions>`.
734744

735745
* - :expression:`$mergeObjects`
736746

@@ -751,13 +761,16 @@ Alphabetical Listing of Expression Operators
751761

752762
Available in :pipeline:`$setWindowFields` stage.
753763

754-
* - :expression:`$minN`
764+
* - :group:`$minN`
755765

756-
- Returns the ``n`` smallest values in an array.
757-
Distinct from the :group:`$minN` accumulator.
758-
759-
.. versionadded:: 5.2
766+
- Returns an aggregation of the ``n`` minimum valued elements in a
767+
group.
760768

769+
.. versionadded:: 5.2
770+
771+
Available in :pipeline:`$group`,
772+
:pipeline:`$setWindowFields`
773+
and as an :ref:`expression <aggregation-expressions>`.
761774

762775
* - :expression:`$millisecond`
763776

@@ -1314,10 +1327,12 @@ Alphabetical Listing of Expression Operators
13141327
/reference/operator/aggregation/ltrim
13151328
/reference/operator/aggregation/map
13161329
/reference/operator/aggregation/max
1330+
/reference/operator/aggregation/maxN
13171331
/reference/operator/aggregation/maxN-array-element
13181332
/reference/operator/aggregation/mergeObjects
13191333
/reference/operator/aggregation/meta
13201334
/reference/operator/aggregation/min
1335+
/reference/operator/aggregation/minN
13211336
/reference/operator/aggregation/minN-array-element
13221337
/reference/operator/aggregation/millisecond
13231338
/reference/operator/aggregation/minute

0 commit comments

Comments
 (0)