Skip to content

Commit a028cd6

Browse files
authored
DOCSP-39616-push-aggregation-missing-behavior (#7857)
* DOCSP-39616-push-aggregation-missing-behavior * Editorial per feedback.
1 parent 601273e commit a028cd6

File tree

1 file changed

+9
-0
lines changed
  • source/reference/operator/aggregation

1 file changed

+9
-0
lines changed

source/reference/operator/aggregation/push.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ Syntax
3333
For more information on expressions, see
3434
:ref:`aggregation-expressions`.
3535

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+
3645
Examples
3746
--------
3847

0 commit comments

Comments
 (0)