Skip to content

Commit c83876d

Browse files
committed
DOCSP-45382 - Comprehensive Coverage (#654)
(cherry picked from commit 7dfe216)
1 parent 427ce9f commit c83876d

File tree

169 files changed

+7017
-4048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+7017
-4048
lines changed

config/intersphinx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Weirdly, giza wants a non-empty list of two or more, so we have to include extraneous/unused one --hence the python
1+
# Weirdly, giza wants a non-empty list of two or more, so we must include extraneous/unused one --hence the python
22
name: python
33
url: https://docs.python.org/2/
44
path: python2.inv

snooty.toml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
toc_landing_pages = [
2-
"/fundamentals/connection",
3-
"/fundamentals/crud",
4-
"/usage-examples",
5-
"/fundamentals",
6-
"/fundamentals/serialization",
7-
"/fundamentals/crud/write-operations/update-one",
8-
"/fundamentals/crud/write-operations/update-many",
9-
"/fundamentals/authentication",
10-
"/upgrade",
11-
"/fundamentals/database-collection",
12-
"/fundamentals/indexes",
2+
"/get-started",
3+
"/connect/connection-options",
4+
"/security/authentication",
5+
"/aggregation",
6+
"/aggregation/stages",
7+
"/serialization",
8+
"/indexes",
139
]
1410
name = "csharp"
1511
title = "C#/.NET Driver"
@@ -49,4 +45,4 @@ not-available = "N/A"
4945
analyzer = "MongoDB C# Analyzer"
5046
analyzer-short = "C# Analyzer"
5147
query-api = "MongoDB Query API"
52-
vector-search = "Atlas Vector Search"
48+
avs = "Atlas Vector Search"

source/aggregation.txt

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
.. _csharp-aggregation:
2+
3+
======================
4+
Aggregation Operations
5+
======================
6+
7+
.. facet::
8+
:name: genre
9+
:values: reference
10+
11+
.. meta::
12+
:keywords: dotnet, code example, transform, pipeline
13+
14+
.. contents:: On this page
15+
:local:
16+
:backlinks: none
17+
:depth: 2
18+
:class: singlecol
19+
20+
.. toctree::
21+
:titlesonly:
22+
:maxdepth: 1
23+
24+
Pipeline Stages </aggregation/stages>
25+
LINQ </aggregation/linq>
26+
27+
Overview
28+
--------
29+
30+
In this guide, you can learn how to use the {+driver-long+} to perform
31+
**aggregation operations**.
32+
33+
Aggregation operations process data in your MongoDB collections and
34+
return computed results. The MongoDB Aggregation framework is modeled on the
35+
concept of data processing pipelines. Documents enter a pipeline comprised of one or
36+
more stages, and this pipeline transforms the documents into an aggregated result.
37+
38+
To learn more about the aggregation stages supported by the {+driver-short+}, see
39+
:ref:`Aggregation Stages <csharp-aggregation-stages>`.
40+
41+
.. sharedinclude:: dbx/agg-tutorials-manual-tip.rst
42+
43+
.. replacement:: language
44+
45+
:guilabel:`{+language+}`
46+
47+
Analogy
48+
~~~~~~~
49+
50+
Aggregation operations function similarly to car factories with assembly
51+
lines. The assembly lines have stations with specialized tools to
52+
perform specific tasks. For example, when building a car, the assembly
53+
line begins with the frame. Then, as the car frame moves through the
54+
assembly line, each station assembles a separate part. The result is a
55+
transformed final product, the finished car.
56+
57+
The assembly line represents the *aggregation pipeline*, the individual
58+
stations represent the *aggregation stages*, the specialized tools
59+
represent the *expression operators*, and the finished product
60+
represents the *aggregated result*.
61+
62+
Compare Aggregation and Find Operations
63+
---------------------------------------
64+
65+
The following table lists the different tasks you can perform with find
66+
operations, compared to what you can achieve with aggregation
67+
operations. The aggregation framework provides expanded functionality
68+
that allows you to transform and manipulate your data.
69+
70+
.. list-table::
71+
:header-rows: 1
72+
:widths: 50 50
73+
74+
* - Find Operations
75+
- Aggregation Operations
76+
77+
* - | Select *certain* documents to return
78+
| Select *which* fields to return
79+
| Sort the results
80+
| Limit the results
81+
| Count the results
82+
- | Select *certain* documents to return
83+
| Select *which* fields to return
84+
| Sort the results
85+
| Limit the results
86+
| Count the results
87+
| Group the results
88+
| Rename fields
89+
| Compute new fields
90+
| Summarize data
91+
| Connect and merge data sets
92+
93+
Server Limitations
94+
------------------
95+
96+
Consider the following :manual:`limitations </core/aggregation-pipeline-limits/>` when
97+
performing aggregation operations:
98+
99+
- Returned documents must not violate the :manual:`BSON document size limit </reference/limits/#mongodb-limit-BSON-Document-Size>`
100+
of 16 megabytes.
101+
102+
- Pipeline stages have a memory limit of 100 megabytes by default. If required, you can exceed this limit by setting
103+
the `AllowDiskUse <{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.AggregateOptions.AllowDiskUse.html#MongoDB_Driver_AggregateOptions_AllowDiskUse>`__
104+
property of the ``AggregateOptions`` object that you pass to the ``Aggregate()`` method.
105+
106+
Troubleshooting
107+
---------------
108+
109+
.. include:: /includes/troubleshooting/unsupported-filter-expression.rst
110+
111+
Additional Information
112+
----------------------
113+
114+
To view a full list of expression operators, see
115+
:manual:`Aggregation Operators </reference/operator/aggregation/>`.
116+
117+
To learn about explaining MongoDB aggregation operations, see
118+
:manual:`Explain Results </reference/explain-results/>` and
119+
:manual:`Query Plans </core/query-plans/>`.

source/fundamentals/linq.txt renamed to source/aggregation/linq.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
.. _csharp-linq:
22

3+
======================================
4+
LINQ Syntax for Aggregation Operations
5+
======================================
36
======================================
47
LINQ Syntax for Aggregation Operations
58
======================================
@@ -35,7 +38,7 @@ The {+driver-short+} automatically translates LINQ queries into
3538
The examples in this guide use the ``restaurants`` collection
3639
in the ``sample_restaurants`` database provided in the :atlas:`Atlas sample datasets </sample-data>`.
3740
To learn how to create a free MongoDB Atlas cluster and load the sample datasets,
38-
see the :ref:`<csharp-quickstart>`.
41+
see :ref:`<csharp-get-started>`.
3942

4043
The following ``Restaurant``, ``Address`` and ``GradeEntry`` classes model the
4144
documents in this collection:
@@ -974,11 +977,10 @@ The {+driver-long+} implementation of LINQ does not support the following
974977
aggregation stages:
975978

976979
- ``$redact``
977-
- ``$geoNear``
978980
- ``$out``
979981

980982
To learn how to create an aggregation pipeline with the ``$out`` stage by using Builders, see
981-
the :ref:`<csharp-builders-out>` section.
983+
:ref:`<csharp-aggregation-stages>`.
982984

983985
Supported Methods
984986
-----------------

0 commit comments

Comments
 (0)