We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 601273e commit a028cd6Copy full SHA for a028cd6
source/reference/operator/aggregation/push.txt
@@ -33,6 +33,15 @@ Syntax
33
For more information on expressions, see
34
:ref:`aggregation-expressions`.
35
36
+Behavior
37
+--------
38
+
39
+When using :group:`$push` in a :pipeline:`$group` stage, the order of
40
+the documents coming into the pipeline determines the order of the
41
+documents in the output array. To guarantee a defined order, the
42
+:pipeline:`$group` pipeline stage should follow a :pipeline:`$sort`
43
+stage.
44
45
Examples
46
--------
47
0 commit comments