Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/reference/aggregation/sort.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ $sort (aggregation)
.. include:: /includes/fact-agg-sort-limit.rst

.. warning:: Unless the :pipeline:`$sort` operator can use an index,
the :pipeline:`$sort` operation must fit within memory.
or in 2.4, immediately precedes a :pipeline:`$limit`, the
:pipeline:`$sort` operation must fit within memory. For
:pipeline:`$sort` operations that immediately precedes a
:pipeline:`$limit` stage in 2.4, the limited results must fit
within memory.

.. todo:: if a sort precedes the first $group in a sharded system,
all documents must go to the mongos for sorting.