File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
source/reference/operator/aggregation Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,18 @@ collection scan followed by a random sort to select N documents. In
44
44
this case, the :pipeline:`$sample` stage is subject to the
45
45
:ref:`sort memory restrictions <sort-memory-limit>`.
46
46
47
- .. warning::
47
+ MMAPV1 May Return Duplicate Documents
48
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
49
49
- :pipeline:`$sample` may output the same document more than once in
50
- its result set.
50
+ If you are using the:
51
+
52
+ - MMAPV1 storage engine, :pipeline:`$sample` may return the same
53
+ document more than once in the result set.
54
+
55
+ - :ref:`WiredTiger <storage-wiredtiger>` or
56
+ :ref:`in-memory <storage-inmemory>` storage engine,
57
+ :pipeline:`$sample` does not return duplicate documents. WiredTiger
58
+ is the default storage engine as of MongoDB 3.2.
51
59
52
60
Example
53
61
--------
You can’t perform that action at this time.
0 commit comments