File tree Expand file tree Collapse file tree 3 files changed +19
-17
lines changed
reference/operator/aggregation Expand file tree Collapse file tree 3 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -16,20 +16,14 @@ following limitations.
16
16
Result Size Restrictions
17
17
------------------------
18
18
19
- .. versionchanged:: 3.6
20
-
21
- MongoDB 3.6 removes the option for the :dbcommand:`aggregate`
22
- command to return its results as a single document.
23
-
24
19
The :dbcommand:`aggregate` command can either return a cursor or store
25
- the results in a collection. When returning a cursor or storing the
26
- results in a collection, each document in the result set is subject to
27
- the :limit:`BSON Document Size` limit, currently 16 megabytes; if any
28
- single document exceeds the :limit:`BSON Document Size` limit, the
29
- command produces an error. The limit only applies to the returned
30
- documents; during the pipeline processing, the documents may exceed this
31
- size. The :method:`db.collection.aggregate()` method returns a cursor by
32
- default.
20
+ the results in a collection. Each document in the result set is subject
21
+ to the 16 megabyte :limit:`BSON Document Size limit <BSON Document
22
+ Size>`. If any single document exceeds the :limit:`BSON Document Size
23
+ limit <BSON Document Size>`, the aggregation produces an error. The
24
+ limit only applies to the returned documents. During the pipeline
25
+ processing, the documents may exceed this size. The
26
+ :method:`db.collection.aggregate()` method returns a cursor by default.
33
27
34
28
.. _agg-memory-restrictions:
35
29
Original file line number Diff line number Diff line change @@ -36,8 +36,4 @@ Examples of stages that can spill to disk when :ref:`allowDiskUse
36
36
If the results of one of your :pipeline: `$sort ` pipeline stages exceed
37
37
the limit, consider :ref: `adding a $limit stage <sort-limit-sequence >`.
38
38
39
- .. versionchanged :: 3.4
40
-
41
- .. include :: /includes/fact-graphlookup-memory-restrictions.rst
42
-
43
39
.. include :: /includes/extracts/4.2-changes-usedDisk.rst
Original file line number Diff line number Diff line change @@ -49,6 +49,18 @@ Definition
49
49
50
50
Specify the output field name for each specified pipeline.
51
51
52
+ Considerations
53
+ --------------
54
+
55
+ The output of the :pipeline:`$facet` stage is subject to the 16 megabyte
56
+ :limit:`BSON Document Size limit <BSON Document Size>`. If the results
57
+ of the :pipeline:`$facet` stage exceed the :limit:`BSON Document Size
58
+ limit <BSON Document Size>`, the aggregation produces an error.
59
+
60
+ .. seealso::
61
+
62
+ :doc:`/core/aggregation-pipeline-limits`
63
+
52
64
Behavior
53
65
--------
54
66
You can’t perform that action at this time.
0 commit comments