$push (aggregation)
On this page
Definition
-
$push
-
Returns an array of all values that result from applying an expression to each document in a group of documents that share the same group by key.
$push
is only available in the$group
stage.$push
has the following syntax:For more information on expressions, see Expressions.
Behavior
Memory Restrictions
Starting in version 3.6.17, $push
has a memory limit of 100 MiB (100 * 1024 * 1024 bytes), even when db.collection.aggregate()
is run with allowDiskUse: true.
See aggregration pipeline limitations for more information.