Skip to content

Commit 91e756d

Browse files
committed
DOCS-9188: the $gt operator requires the $
1 parent 657ca78 commit 91e756d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/core/index-compound.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ as well as both ``item`` and ``stock`` fields:
7979
.. code-block:: javascript
8080

8181
db.products.find( { item: "Banana" } )
82-
db.products.find( { item: "Banana", stock: { gt: 5 } } )
82+
db.products.find( { item: "Banana", stock: { $gt: 5 } } )
8383

8484
For details, see :ref:`compound-index-prefix`.
8585

source/tutorial/sort-results-with-indexes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ appear in the index. For example, an index key pattern ``{ a: 1, b: 1
6363
1 }``.
6464

6565
For a query to use a compound index for a sort, the specified sort direction
66-
for all keys must match the index
66+
for all keys in the :method:`cursor.sort()` document must match the index
6767
key pattern *or* match the inverse of the index key pattern.
6868
For example, an index key pattern ``{ a: 1, b: -1 }`` can
6969
support a sort on ``{ a: 1, b: -1 }`` and ``{ a: -1, b: 1 }`` but **not**

0 commit comments

Comments
 (0)