File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -179,21 +179,22 @@ Because you will always call :method:`aggregate` on a
179
179
the aggregation pipeline, you may want to optimize the operation
180
180
by avoiding scanning the entire collection whenever possible.
181
181
182
- Aggregation Operators and Indexes
183
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182
+ Pipeline Operators and Indexes
183
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
184
184
185
185
Depending on the order in which they appear in the pipeline,
186
186
aggregation operators can take advantage of indexes.
187
187
188
- The following aggregation operators:
188
+ The following pipeline operators take advantage of an index when they
189
+ occur at the beginning of the pipeline:
189
190
190
191
- :agg:pipeline:`$match`
191
192
- :agg:pipeline:`$sort`
192
193
- :agg:pipeline:`$limit`
193
194
- :agg:pipeline:`$skip`
194
195
195
- can take advantage of an index when placed at the **beginning ** of the pipleline or
196
- placed **before** the following aggregation operators:
196
+ The above operators can also use an index when placed **before ** the
197
+ following aggregation operators:
197
198
198
199
- :agg:pipeline:`$project`
199
200
- :agg:pipeline:`$unwind`
You can’t perform that action at this time.
0 commit comments