@@ -104,10 +104,9 @@ Aggregation Stage Methods
104
104
-------------------------
105
105
106
106
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.
111
110
112
111
If an aggregation stage isn't in the table, the driver doesn't provide a builder method for
113
112
it. In this case, you must use the
@@ -125,56 +124,56 @@ to your pipeline.
125
124
* - :manual:`$bucket </reference/operator/aggregation/bucket/>`
126
125
- Categorizes incoming documents into groups, called buckets,
127
126
based on a specified expression and bucket boundaries.
128
- - :ref:` Bucket() <csharp-aggregation-bucket> `
127
+ - `` Bucket()` `
129
128
130
129
* - :manual:`$bucketAuto </reference/operator/aggregation/bucketAuto/>`
131
130
- Categorizes incoming documents into a specific number of
132
131
groups, called buckets, based on a specified expression.
133
132
Bucket boundaries are automatically determined in an attempt
134
133
to evenly distribute the documents into the specified number
135
134
of buckets.
136
- - :ref:` BucketAuto() <csharp-aggregation-bucketauto> `
135
+ - `` BucketAuto()` `
137
136
138
137
* - :manual:`$changeStream </reference/operator/aggregation/changeStream/>`
139
138
- Returns a change stream cursor for the
140
139
collection. This stage can occur only once in an aggregation
141
140
pipeline and it must occur as the first stage.
142
- - :ref:` ChangeStream() <csharp-aggregation-changestream> `
141
+ - `` ChangeStream()` `
143
142
144
143
* - :manual:`$changeStreamSplitLargeEvent </reference/operator/aggregation/changeStreamSplitLargeEvent/>`
145
144
- Splits large change stream events that exceed 16 MB into smaller fragments returned
146
145
in a change stream cursor.
147
146
148
147
You can use ``$changeStreamSplitLargeEvent`` only in a ``$changeStream`` pipeline, and
149
148
it must be the final stage in the pipeline.
150
- - :ref:` ChangeStreamSplitLargeEvent() <csharp-aggregation-changestreamsplitlargeevent> `
149
+ - `` ChangeStreamSplitLargeEvent()` `
151
150
152
151
* - :manual:`$count </reference/operator/aggregation/count/>`
153
152
- Returns a count of the number of documents at this stage of
154
153
the aggregation pipeline.
155
- - :ref:` Count() <csharp-aggregation-count> `
154
+ - `` Count()` `
156
155
157
156
* - :manual:`$densify </reference/operator/aggregation/densify/>`
158
157
- Creates new documents in a sequence of documents where certain values in a field are missing.
159
- - :ref:` Densify() <csharp-aggregation-densify> `
158
+ - `` Densify()` `
160
159
161
160
* - :manual:`$documents </reference/operator/aggregation/documents/>`
162
161
- Returns literal documents from input expressions.
163
- - :ref:` Documents() <csharp-aggregation-documents> `
162
+ - `` Documents()` `
164
163
165
164
* - :manual:`$facet </reference/operator/aggregation/facet/>`
166
165
- Processes multiple aggregation pipelines
167
166
within a single stage on the same set
168
167
of input documents. Enables the creation of multi-faceted
169
168
aggregations capable of characterizing data across multiple
170
169
dimensions, or facets, in a single stage.
171
- - :ref:` Facet() <csharp-aggregation-facet> `
170
+ - `` Facet()` `
172
171
173
172
* - :manual:`$graphLookup </reference/operator/aggregation/graphLookup/>`
174
173
- Performs a recursive search on a collection. This method adds
175
174
a new array field to each output document that contains the traversal
176
175
results of the recursive search for that document.
177
- - :ref:` GraphLookup() <csharp-aggregation-graphlookup> `
176
+ - `` GraphLookup()` `
178
177
179
178
* - :manual:`$group </reference/operator/aggregation/group/>`
180
179
- Groups input documents by a specified identifier expression
@@ -183,27 +182,27 @@ to your pipeline.
183
182
document per each distinct group. The output documents
184
183
contain only the identifier field and, if specified, accumulated
185
184
fields.
186
- - :ref:` Group() <csharp-aggregation-group> `
185
+ - `` Group()` `
187
186
188
187
* - :manual:`$limit </reference/operator/aggregation/limit/>`
189
188
- Passes the first *n* documents unmodified to the pipeline,
190
189
where *n* is the specified limit. For each input document,
191
190
outputs either one document (for the first *n* documents) or
192
191
zero documents (after the first *n* documents).
193
- - :ref:` Limit() <csharp-aggregation-limit> `
192
+ - `` Limit()` `
194
193
195
194
* - :manual:`$lookup </reference/operator/aggregation/facet/>`
196
195
- Performs a left outer join to another collection in the
197
196
*same* database to filter in documents from the "joined"
198
197
collection for processing.
199
- - :ref:` Lookup() <csharp-aggregation-lookup> `
198
+ - `` Lookup()` `
200
199
201
200
* - :manual:`$match </reference/operator/aggregation/match/>`
202
201
- Filters the document stream to allow only matching documents
203
202
to pass unmodified into the next pipeline stage.
204
203
For each input document, outputs either one document (a match) or zero
205
204
documents (no match).
206
- - :ref:` Match() <csharp-aggregation-match> `
205
+ - `` Match()` `
207
206
208
207
* - :manual:`$merge </reference/operator/aggregation/merge/>`
209
208
- Writes the resulting documents of the aggregation pipeline to
@@ -213,24 +212,24 @@ to your pipeline.
213
212
custom update pipeline) the results into an output
214
213
collection. To use this stage, it must be
215
214
the last stage in the pipeline.
216
- - :ref:` Merge() <csharp-aggregation-merge> `
215
+ - `` Merge()` `
217
216
218
217
* - :manual:`$out </reference/operator/aggregation/out/>`
219
218
- Writes the resulting documents of the aggregation pipeline to
220
219
a collection. To use this stage, it must be
221
220
the last stage in the pipeline.
222
- - :ref:` Out() <csharp-aggregation-out> `
221
+ - `` Out()` `
223
222
224
223
* - :manual:`$project </reference/operator/aggregation/project/>`
225
224
- Reshapes each document in the stream, such as by adding new
226
225
fields or removing existing fields. For each input document,
227
226
outputs one document.
228
- - :ref:` Project() <csharp-aggregation-project> `
227
+ - `` Project()` `
229
228
230
229
* - :manual:`$rankFusion </reference/operator/aggregation/rankFusion/>`
231
230
- Uses a rank fusion algorithm to combine results from a Vector Search
232
231
query and an Atlas Search query.
233
- - :ref:` RankFusion() <csharp-aggregation-rankfusion> `
232
+ - `` RankFusion()` `
234
233
235
234
* - :manual:`$replaceRoot </reference/operator/aggregation/replaceRoot/>`
236
235
- Replaces a document with the specified embedded document. The
@@ -240,7 +239,7 @@ to your pipeline.
240
239
top level.
241
240
242
241
The ``$replaceWith`` stage is an alias for the ``$replaceRoot`` stage.
243
- - :ref:` ReplaceRoot() <csharp-aggregation-replaceroot> `
242
+ - `` ReplaceRoot()` `
244
243
245
244
* - :manual:`$replaceWith </reference/operator/aggregation/replaceWith/>`
246
245
- Replaces a document with the specified embedded document.
@@ -249,12 +248,12 @@ to your pipeline.
249
248
the embedded document to the top level.
250
249
251
250
The ``$replaceWith`` stage is an alias for the ``$replaceRoot`` stage.
252
- - :ref:` ReplaceWith() <csharp-aggregation-replacewith> `
251
+ - `` ReplaceWith()` `
253
252
254
253
* - :manual:`$sample </reference/operator/aggregation/sample/>`
255
254
- Randomly selects the specified number of documents from its
256
255
input.
257
- - :ref:` Sample() <csharp-aggregation-sample> `
256
+ - `` Sample()` `
258
257
259
258
* - :manual:`$search </reference/operator/aggregation/search/>`
260
259
- Performs a full-text search of the field or fields in an
@@ -265,7 +264,7 @@ to your pipeline.
265
264
available for self-managed deployments. To learn more, see
266
265
:atlas:`Atlas Search Aggregation Pipeline Stages
267
266
</reference/atlas-search/query-syntax>` in the Atlas documentation.
268
- - :ref:` Search() <csharp-aggregation-search> `
267
+ - `` Search()` `
269
268
270
269
* - :manual:`$searchMeta </reference/operator/aggregation/searchMeta/>`
271
270
- Returns different types of metadata result documents for the
@@ -277,52 +276,52 @@ to your pipeline.
277
276
and is not available for self-managed deployments. To learn
278
277
more, see :atlas:`Atlas Search Aggregation Pipeline Stages
279
278
</reference/atlas-search/query-syntax>` in the Atlas documentation.
280
- - :ref:` SearchMeta() <csharp-aggregation-searchmeta> `
279
+ - `` SearchMeta()` `
281
280
282
281
* - :manual:`$set </reference/operator/aggregation/set/>`
283
282
- Adds new fields to documents. Like the ``Project()`` method,
284
283
this method reshapes each
285
284
document in the stream by adding new fields to
286
285
output documents that contain both the existing fields
287
286
from the input documents and the newly added fields.
288
- - :ref:` Set() <csharp-aggregation-set> `
287
+ - `` Set()` `
289
288
290
289
* - :manual:`$setWindowFields </reference/operator/aggregation/setWindowFields/>`
291
290
- Groups documents into windows and applies one or more
292
291
operators to the documents in each window.
293
- - :ref:` SetWindowFields() <csharp-aggregation-setwindowfields> `
292
+ - `` SetWindowFields()` `
294
293
295
294
* - :manual:`$skip </reference/operator/aggregation/skip/>`
296
295
- Skips the first *n* documents, where *n* is the specified skip
297
296
number, and passes the remaining documents unmodified to the
298
297
pipeline. For each input document, outputs either zero
299
298
documents (for the first *n* documents) or one document (if
300
299
after the first *n* documents).
301
- - :ref:` Skip() <csharp-aggregation-skip> `
300
+ - `` Skip()` `
302
301
303
302
* - :manual:`$sort </reference/operator/aggregation/sort/>`
304
303
- Reorders the document stream by a specified sort key. The documents remain unmodified.
305
304
For each input document, outputs one document.
306
- - :ref:` Sort() <csharp-aggregation-sort> `
305
+ - `` Sort()` `
307
306
308
307
* - :manual:`$sortByCount </reference/operator/aggregation/sortByCount/>`
309
308
- Groups incoming documents based on the value of a specified
310
309
expression, then computes the count of documents in each
311
310
distinct group.
312
- - :ref:` SortByCount() <csharp-aggregation-sortbycount> `
311
+ - `` SortByCount()` `
313
312
314
313
* - :manual:`$unionWith </reference/operator/aggregation/unionWith/>`
315
314
- Combines pipeline results from two collections into a single
316
315
result set.
317
- - :ref:` UnionWith() <csharp-aggregation-unionwith> `
316
+ - `` UnionWith()` `
318
317
319
318
* - :manual:`$unwind </reference/operator/aggregation/unwind/>`
320
319
- Deconstructs an array field from the input documents to
321
320
output a document for *each* element. Each output document
322
321
replaces the array with an element value. For each input
323
322
document, outputs *n* Documents, where *n* is the number of
324
323
array elements. *n* can be zero for an empty array.
325
- - :ref:` Unwind() <csharp-aggregation-unwind> `
324
+ - `` Unwind()` `
326
325
327
326
* - :manual:`$vectorSearch </reference/operator/aggregation/vectorSearch/>`
328
327
- Performs an :abbr:`ANN (Approximate Nearest Neighbor)` or
@@ -333,7 +332,7 @@ to your pipeline.
333
332
This stage is available only for MongoDB Atlas clusters, and is not
334
333
available for self-managed deployments. To learn more, see
335
334
:ref:`Atlas Vector Search <csharp-atlas-vector-search>`.
336
- - :ref:` VectorSearch() <csharp-aggregation-vectorsearch> `
335
+ - `` VectorSearch()` `
337
336
338
337
API Documentation
339
338
-----------------
0 commit comments