Skip to content

Commit 5a2acd3

Browse files
committed
comments
1 parent 800c8c8 commit 5a2acd3

File tree

2 files changed

+99
-33
lines changed

2 files changed

+99
-33
lines changed

source/reference/meta-query-operators.rst

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Introduction
99

1010
In addition to the :doc:`MongoDB Query Operators
1111
</reference/operators>`, there are a number of "meta" operators that
12-
you may use to modify the output or behavior or output of the
12+
you may use to modify the output or behavior of a
1313
query. Specify these modifiers to a :func:`find()` query, in the
1414
following form (for the :program:`mongo` shell):
1515

@@ -18,7 +18,7 @@ following form (for the :program:`mongo` shell):
1818
db.collection.find( { [QUERY] } )._addSpecial( [MODIFER] )
1919
2020
Here, the query specified by "``[QUERY]``" runs on the collection
21-
named ``collection`` while the operation specified by the
21+
named ``collection`` with the operation specified by the
2222
``[MODIFER]`` The results are then processed by a modifier expression
2323
selected from the following list. Many of the operators have
2424
corresponding :doc:`methods in the shell </reference/javascript>`. For
@@ -90,6 +90,8 @@ Modifiers
9090
Use operation alone or in conjunction with :operator:`$max`
9191
to limit results to a specific range.
9292

93+
TODO This should be avoided unless necessary, use $gte instead.
94+
9395
.. operator:: $max
9496

9597
Specify a :operator:`$max` value to specify an upper boundary for
@@ -109,6 +111,8 @@ Modifiers
109111
Use operation alone or in conjunction with :operator:`$min`
110112
to limit results to a specific range.
111113

114+
TODO This should be avoided unless necessary, use $lt instead.
115+
112116
.. operator:: $query
113117

114118
The :operator:`$query` operator provides an interface to describe
@@ -148,7 +152,7 @@ Modifiers
148152
value (e.g. "``1``") to sort in ascending order.
149153

150154
Unless you have a index for the specified key pattern, use
151-
:operator:`$orderby` in conjunction with :operator:`$maxScan` and
155+
:operator:`$orderby` in conjunction with :operator:`$maxScan` and/or
152156
:func:`limit()` to avoid requiring MongoDB to perform a large
153157
in-memory sort. :func:`limit()` increases the speed and reduce
154158
the amount of memory required to return this query by way of an
@@ -168,6 +172,8 @@ Modifiers
168172
"``collection``" using the index on the "``_id``" field. Use this
169173
operator to prevent MongoDB from performing inefficient queries.
170174

175+
TODO - won't necessarily prevent an inefficient query, just lets you pick index manually.
176+
171177
.. operator:: $explain
172178

173179
Use the :operator:`$explain` operator to return a :term:`JSON
@@ -218,3 +224,5 @@ Modifiers
218224

219225
All queries with responses less than 1 megabyte are effectively
220226
snapshotted.
227+
228+
TODO I don't think that's right about < 1 mb

0 commit comments

Comments
 (0)