Skip to content

Commit fde707c

Browse files
mdb-ashleyAshley Brown
andauthored
Add sort limit to $sort (aggregation) and cursor.sort() (#801)
* Adding sort limit in a few places * Resolving comment Co-authored-by: Ashley Brown <[email protected]>
1 parent 6560e61 commit fde707c

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

source/includes/sort-limits.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
You can sort on a maximum of 32 keys.

source/reference/limits.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,13 @@ Indexes
254254
- You cannot use :method:`~cursor.hint()` on a :doc:`hidden index
255255
</core/index-hidden>`.
256256

257+
Sorts
258+
-----
259+
260+
.. limit:: Maximum Number of Sort Keys
261+
262+
.. include:: /includes/sort-limits.rst
263+
257264
Data
258265
----
259266

source/reference/method/cursor.sort.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ Definition
5757
existing fields <sort-asc-desc>` or :ref:`sort on text score metadata
5858
<sort-metadata>`.
5959

60-
Behaviors
61-
---------
60+
Behavior
61+
--------
62+
63+
Limits
64+
~~~~~~
65+
66+
.. include:: /includes/sort-limits.rst
6267

6368
.. _sort-cursor-consistent-sorting:
6469

source/reference/operator/aggregation/sort.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ Definition
5353
Behavior
5454
--------
5555

56+
Limits
57+
~~~~~~
58+
59+
.. include:: /includes/sort-limits.rst
60+
5661
.. _sort-aggregation-consistent-sorting:
5762

5863
Sort Consistency

0 commit comments

Comments
 (0)