Skip to content

Commit 35d9cbc

Browse files
committed
first draft
1 parent 9ddd74f commit 35d9cbc

File tree

1 file changed

+33
-34
lines changed

1 file changed

+33
-34
lines changed

source/aggregation/stages.txt

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,9 @@ Aggregation Stage Methods
104104
-------------------------
105105

106106
The following table lists the builder methods in the {+driver-short+} that correspond
107-
to stages in the aggregation pipeline. To learn more about an aggregation stage,
108-
follow the link from the method name to its reference page in the {+mdb-server+} manual.
109-
To learn more about a builder method, follow the link from the method name to its
110-
dedicated page.
107+
to stages in the aggregation pipeline. To learn more about an aggregation stage and
108+
see a code example for the equivalent C# method, follow the link from the stage name
109+
to its reference page in the {+mdb-server+} manual.
111110

112111
If an aggregation stage isn't in the table, the driver doesn't provide a builder method for
113112
it. In this case, you must use the
@@ -125,56 +124,56 @@ to your pipeline.
125124
* - :manual:`$bucket </reference/operator/aggregation/bucket/>`
126125
- Categorizes incoming documents into groups, called buckets,
127126
based on a specified expression and bucket boundaries.
128-
- :ref:`Bucket() <csharp-aggregation-bucket>`
127+
- ``Bucket()``
129128

130129
* - :manual:`$bucketAuto </reference/operator/aggregation/bucketAuto/>`
131130
- Categorizes incoming documents into a specific number of
132131
groups, called buckets, based on a specified expression.
133132
Bucket boundaries are automatically determined in an attempt
134133
to evenly distribute the documents into the specified number
135134
of buckets.
136-
- :ref:`BucketAuto() <csharp-aggregation-bucketauto>`
135+
- ``BucketAuto()``
137136

138137
* - :manual:`$changeStream </reference/operator/aggregation/changeStream/>`
139138
- Returns a change stream cursor for the
140139
collection. This stage can occur only once in an aggregation
141140
pipeline and it must occur as the first stage.
142-
- :ref:`ChangeStream() <csharp-aggregation-changestream>`
141+
- ``ChangeStream()``
143142

144143
* - :manual:`$changeStreamSplitLargeEvent </reference/operator/aggregation/changeStreamSplitLargeEvent/>`
145144
- Splits large change stream events that exceed 16 MB into smaller fragments returned
146145
in a change stream cursor.
147146

148147
You can use ``$changeStreamSplitLargeEvent`` only in a ``$changeStream`` pipeline, and
149148
it must be the final stage in the pipeline.
150-
- :ref:`ChangeStreamSplitLargeEvent() <csharp-aggregation-changestreamsplitlargeevent>`
149+
- ``ChangeStreamSplitLargeEvent()``
151150

152151
* - :manual:`$count </reference/operator/aggregation/count/>`
153152
- Returns a count of the number of documents at this stage of
154153
the aggregation pipeline.
155-
- :ref:`Count() <csharp-aggregation-count>`
154+
- ``Count()``
156155

157156
* - :manual:`$densify </reference/operator/aggregation/densify/>`
158157
- Creates new documents in a sequence of documents where certain values in a field are missing.
159-
- :ref:`Densify() <csharp-aggregation-densify>`
158+
- ``Densify()``
160159

161160
* - :manual:`$documents </reference/operator/aggregation/documents/>`
162161
- Returns literal documents from input expressions.
163-
- :ref:`Documents() <csharp-aggregation-documents>`
162+
- ``Documents()``
164163

165164
* - :manual:`$facet </reference/operator/aggregation/facet/>`
166165
- Processes multiple aggregation pipelines
167166
within a single stage on the same set
168167
of input documents. Enables the creation of multi-faceted
169168
aggregations capable of characterizing data across multiple
170169
dimensions, or facets, in a single stage.
171-
- :ref:`Facet() <csharp-aggregation-facet>`
170+
- ``Facet()``
172171

173172
* - :manual:`$graphLookup </reference/operator/aggregation/graphLookup/>`
174173
- Performs a recursive search on a collection. This method adds
175174
a new array field to each output document that contains the traversal
176175
results of the recursive search for that document.
177-
- :ref:`GraphLookup() <csharp-aggregation-graphlookup>`
176+
- ``GraphLookup()``
178177

179178
* - :manual:`$group </reference/operator/aggregation/group/>`
180179
- Groups input documents by a specified identifier expression
@@ -183,27 +182,27 @@ to your pipeline.
183182
document per each distinct group. The output documents
184183
contain only the identifier field and, if specified, accumulated
185184
fields.
186-
- :ref:`Group() <csharp-aggregation-group>`
185+
- ``Group()``
187186

188187
* - :manual:`$limit </reference/operator/aggregation/limit/>`
189188
- Passes the first *n* documents unmodified to the pipeline,
190189
where *n* is the specified limit. For each input document,
191190
outputs either one document (for the first *n* documents) or
192191
zero documents (after the first *n* documents).
193-
- :ref:`Limit() <csharp-aggregation-limit>`
192+
- ``Limit()``
194193

195194
* - :manual:`$lookup </reference/operator/aggregation/facet/>`
196195
- Performs a left outer join to another collection in the
197196
*same* database to filter in documents from the "joined"
198197
collection for processing.
199-
- :ref:`Lookup() <csharp-aggregation-lookup>`
198+
- ``Lookup()``
200199

201200
* - :manual:`$match </reference/operator/aggregation/match/>`
202201
- Filters the document stream to allow only matching documents
203202
to pass unmodified into the next pipeline stage.
204203
For each input document, outputs either one document (a match) or zero
205204
documents (no match).
206-
- :ref:`Match() <csharp-aggregation-match>`
205+
- ``Match()``
207206

208207
* - :manual:`$merge </reference/operator/aggregation/merge/>`
209208
- Writes the resulting documents of the aggregation pipeline to
@@ -213,24 +212,24 @@ to your pipeline.
213212
custom update pipeline) the results into an output
214213
collection. To use this stage, it must be
215214
the last stage in the pipeline.
216-
- :ref:`Merge() <csharp-aggregation-merge>`
215+
- ``Merge()``
217216

218217
* - :manual:`$out </reference/operator/aggregation/out/>`
219218
- Writes the resulting documents of the aggregation pipeline to
220219
a collection. To use this stage, it must be
221220
the last stage in the pipeline.
222-
- :ref:`Out() <csharp-aggregation-out>`
221+
- ``Out()``
223222

224223
* - :manual:`$project </reference/operator/aggregation/project/>`
225224
- Reshapes each document in the stream, such as by adding new
226225
fields or removing existing fields. For each input document,
227226
outputs one document.
228-
- :ref:`Project() <csharp-aggregation-project>`
227+
- ``Project()``
229228

230229
* - :manual:`$rankFusion </reference/operator/aggregation/rankFusion/>`
231230
- Uses a rank fusion algorithm to combine results from a Vector Search
232231
query and an Atlas Search query.
233-
- :ref:`RankFusion() <csharp-aggregation-rankfusion>`
232+
- ``RankFusion()``
234233

235234
* - :manual:`$replaceRoot </reference/operator/aggregation/replaceRoot/>`
236235
- Replaces a document with the specified embedded document. The
@@ -240,7 +239,7 @@ to your pipeline.
240239
top level.
241240

242241
The ``$replaceWith`` stage is an alias for the ``$replaceRoot`` stage.
243-
- :ref:`ReplaceRoot() <csharp-aggregation-replaceroot>`
242+
- ``ReplaceRoot()``
244243

245244
* - :manual:`$replaceWith </reference/operator/aggregation/replaceWith/>`
246245
- Replaces a document with the specified embedded document.
@@ -249,12 +248,12 @@ to your pipeline.
249248
the embedded document to the top level.
250249

251250
The ``$replaceWith`` stage is an alias for the ``$replaceRoot`` stage.
252-
- :ref:`ReplaceWith() <csharp-aggregation-replacewith>`
251+
- ``ReplaceWith()``
253252

254253
* - :manual:`$sample </reference/operator/aggregation/sample/>`
255254
- Randomly selects the specified number of documents from its
256255
input.
257-
- :ref:`Sample() <csharp-aggregation-sample>`
256+
- ``Sample()``
258257

259258
* - :manual:`$search </reference/operator/aggregation/search/>`
260259
- Performs a full-text search of the field or fields in an
@@ -265,7 +264,7 @@ to your pipeline.
265264
available for self-managed deployments. To learn more, see
266265
:atlas:`Atlas Search Aggregation Pipeline Stages
267266
</reference/atlas-search/query-syntax>` in the Atlas documentation.
268-
- :ref:`Search() <csharp-aggregation-search>`
267+
- ``Search()``
269268

270269
* - :manual:`$searchMeta </reference/operator/aggregation/searchMeta/>`
271270
- Returns different types of metadata result documents for the
@@ -277,52 +276,52 @@ to your pipeline.
277276
and is not available for self-managed deployments. To learn
278277
more, see :atlas:`Atlas Search Aggregation Pipeline Stages
279278
</reference/atlas-search/query-syntax>` in the Atlas documentation.
280-
- :ref:`SearchMeta() <csharp-aggregation-searchmeta>`
279+
- ``SearchMeta()``
281280

282281
* - :manual:`$set </reference/operator/aggregation/set/>`
283282
- Adds new fields to documents. Like the ``Project()`` method,
284283
this method reshapes each
285284
document in the stream by adding new fields to
286285
output documents that contain both the existing fields
287286
from the input documents and the newly added fields.
288-
- :ref:`Set() <csharp-aggregation-set>`
287+
- ``Set()``
289288

290289
* - :manual:`$setWindowFields </reference/operator/aggregation/setWindowFields/>`
291290
- Groups documents into windows and applies one or more
292291
operators to the documents in each window.
293-
- :ref:`SetWindowFields() <csharp-aggregation-setwindowfields>`
292+
- ``SetWindowFields()``
294293

295294
* - :manual:`$skip </reference/operator/aggregation/skip/>`
296295
- Skips the first *n* documents, where *n* is the specified skip
297296
number, and passes the remaining documents unmodified to the
298297
pipeline. For each input document, outputs either zero
299298
documents (for the first *n* documents) or one document (if
300299
after the first *n* documents).
301-
- :ref:`Skip() <csharp-aggregation-skip>`
300+
- ``Skip()``
302301

303302
* - :manual:`$sort </reference/operator/aggregation/sort/>`
304303
- Reorders the document stream by a specified sort key. The documents remain unmodified.
305304
For each input document, outputs one document.
306-
- :ref:`Sort() <csharp-aggregation-sort>`
305+
- ``Sort()``
307306

308307
* - :manual:`$sortByCount </reference/operator/aggregation/sortByCount/>`
309308
- Groups incoming documents based on the value of a specified
310309
expression, then computes the count of documents in each
311310
distinct group.
312-
- :ref:`SortByCount() <csharp-aggregation-sortbycount>`
311+
- ``SortByCount()``
313312

314313
* - :manual:`$unionWith </reference/operator/aggregation/unionWith/>`
315314
- Combines pipeline results from two collections into a single
316315
result set.
317-
- :ref:`UnionWith() <csharp-aggregation-unionwith>`
316+
- ``UnionWith()``
318317

319318
* - :manual:`$unwind </reference/operator/aggregation/unwind/>`
320319
- Deconstructs an array field from the input documents to
321320
output a document for *each* element. Each output document
322321
replaces the array with an element value. For each input
323322
document, outputs *n* Documents, where *n* is the number of
324323
array elements. *n* can be zero for an empty array.
325-
- :ref:`Unwind() <csharp-aggregation-unwind>`
324+
- ``Unwind()``
326325

327326
* - :manual:`$vectorSearch </reference/operator/aggregation/vectorSearch/>`
328327
- Performs an :abbr:`ANN (Approximate Nearest Neighbor)` or
@@ -333,7 +332,7 @@ to your pipeline.
333332
This stage is available only for MongoDB Atlas clusters, and is not
334333
available for self-managed deployments. To learn more, see
335334
:ref:`Atlas Vector Search <csharp-atlas-vector-search>`.
336-
- :ref:`VectorSearch() <csharp-aggregation-vectorsearch>`
335+
- ``VectorSearch()``
337336

338337
API Documentation
339338
-----------------

0 commit comments

Comments
 (0)