@@ -134,22 +134,22 @@ following stages:
134134 .. output::
135135 :visible: false
136136
137- {"_id"=>"Missing ", "count"=>51 }
138- {"_id"=>"Queens ", "count"=>5656 }
139- {"_id"=>"Staten Island ", "count"=>969 }
140- {"_id"=>"Brooklyn ", "count"=>6086 }
141- {"_id"=>"Manhattan ", "count"=>10259 }
142- {"_id"=>"Bronx ", "count"=>2338 }
137+ {"_id"=>"Bronx ", "count"=>71 }
138+ {"_id"=>"Manhattan ", "count"=>221 }
139+ {"_id"=>"Queens ", "count"=>204 }
140+ {"_id"=>"Missing ", "count"=>2 }
141+ {"_id"=>"Staten Island ", "count"=>20 }
142+ {"_id"=>"Brooklyn ", "count"=>173 }
143143
144144Explain an Aggregation
145145~~~~~~~~~~~~~~~~~~~~~~
146146
147147To view information about how MongoDB executes your operation, you can instruct
148- the MongoDB query planner to **explain** it. When MongoDB explains an operation,
149- it returns **execution plans** and performance statistics. An execution plan is
150- a potential way in which MongoDB can complete an operation. When you instruct
151- MongoDB to explain an operation, it returns both the plan MongoDB executed and
152- any rejected execution plans by default.
148+ the MongoDB :manual:` query planner </core/query-plans>` to **explain** it. When
149+ MongoDB explains an operation, it returns **execution plans** and performance
150+ statistics. An execution plan is a potential way in which MongoDB can complete
151+ an operation. When you instruct MongoDB to explain an operation, it returns both
152+ the plan MongoDB executed and any rejected execution plans by default.
153153
154154To explain an aggregation operation, chain the ``explain`` method to the
155155``aggregate`` method.
@@ -181,7 +181,7 @@ from the preceding :ref:`ruby-aggregation-example`:
181181Run an Atlas Full-Text Search
182182~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
183183
184- .. tip :: Only Available on Atlas for MongoDB v4.2 and later
184+ .. note :: Only Available on Atlas for MongoDB v4.2 and later
185185
186186 This aggregation pipeline operator is only available for collections hosted
187187 on :atlas:`MongoDB Atlas </>` clusters running v4.2 or later that are
@@ -190,6 +190,14 @@ Run an Atlas Full-Text Search
190190To specify a full-text search of one or more fields, you can create a
191191``$search`` pipeline stage.
192192
193+ .. important::
194+
195+ To run the following example, you must create an Atlas Search index on the ``restaurants``
196+ collection that covers the ``name`` field. Then, replace the ``"<your_search_index_name>"``
197+ placeholder with the name of the index.
198+
199+ .. TODO: Add a link in the callout to the Atlas Search index creation guide.
200+
193201This example creates pipeline stages to perform the following actions:
194202
195203- Search the ``name`` field for the term ``"Salt"``
@@ -214,14 +222,6 @@ This example creates pipeline stages to perform the following actions:
214222 {"_id"=> {"$oid"=> "..."}, "name"=> "Salt And Fat"}
215223 {"_id"=> {"$oid"=> "..."}, "name"=> "Salt And Pepper Diner"}
216224
217- .. important::
218-
219- To run the preceding example, you must create an Atlas Search index on the ``restaurants``
220- collection that covers the ``name`` field. Then, replace the ``"<search index name>"``
221- placeholder with the name of the index.
222-
223- .. TODO: Add a link in the callout to the Atlas Search index creation guide.
224-
225225Additional Information
226226----------------------
227227
0 commit comments