@@ -15,11 +15,11 @@ following form (for the :program:`mongo` shell):
15
15
16
16
.. code-block :: javascript
17
17
18
- db .collection .find ( { [QUERY ] } )._addSpecial ( [MODIFER ] )
18
+ db .collection .find ( { [QUERY ] } )._addSpecial ( [MODIFIER ] )
19
19
20
20
Here, the query specified by "``[QUERY] ``" runs on the collection
21
21
named ``collection `` with the operation specified by the
22
- ``[MODIFER ] `` The results are then processed by a modifier expression
22
+ " ``[MODIFIER ] ``". The results are then processed by a modifier expression
23
23
selected from the following list. Many of the operators have
24
24
corresponding :doc: `methods in the shell </reference/javascript >`. For
25
25
the proposes of this reference, this document assumes the above form
@@ -90,7 +90,11 @@ Modifiers
90
90
Use operation alone or in conjunction with :operator: `$max `
91
91
to limit results to a specific range.
92
92
93
- TODO This should be avoided unless necessary, use $gte instead.
93
+
94
+ .. note ::
95
+
96
+ In most cases, you should avoid this operator in favor of
97
+ :operator: `$gte `.
94
98
95
99
.. operator :: $max
96
100
@@ -111,7 +115,10 @@ TODO This should be avoided unless necessary, use $gte instead.
111
115
Use operation alone or in conjunction with :operator: `$min `
112
116
to limit results to a specific range.
113
117
114
- TODO This should be avoided unless necessary, use $lt instead.
118
+ .. note ::
119
+
120
+ In most cases, you should avoid this operator in favor of
121
+ :operator: `$lt `.
115
122
116
123
.. operator :: $query
117
124
@@ -161,18 +168,18 @@ TODO This should be avoided unless necessary, use $lt instead.
161
168
.. operator :: $hint
162
169
163
170
Use the :operator: `$hint ` operator to force the query optimizer to
164
- use a specific index to fulfill the query. Consider the following
165
- form:
171
+ use a specific index to fulfill the query. Use :operator: `$hint `
172
+ for testing query performance and indexing strategies. Consider
173
+ the following form:
166
174
167
175
.. code-block :: javascript
168
176
169
177
db .collection .find ()._addSpecial ( " $hint" , { _id : 1 } )
170
178
171
179
This operation returns all documents in the collection named
172
180
"``collection ``" using the index on the "``_id ``" field. Use this
173
- operator to prevent MongoDB from performing inefficient queries.
174
-
175
- TODO - won't necessarily prevent an inefficient query, just lets you pick index manually.
181
+ operator to override MongoDB's default index selection process and
182
+ pick indexes manually.
176
183
177
184
.. operator :: $explain
178
185
@@ -222,7 +229,7 @@ TODO - won't necessarily prevent an inefficient query, just lets you pick index
222
229
Do not use snapshot with :operator: `$hint `, or :operator: `$orderby `
223
230
(:func: `sort() `.)
224
231
225
- All queries with responses less than 1 megabyte are effectively
226
- snapshotted.
232
+ .. All queries with responses less than 1 megabyte are effectively
233
+ .. snapshotted.
227
234
228
- TODO I don't think that's right about < 1 mb
235
+ .. TODO " I don't think that's right about < 1 mb" --astaple
0 commit comments