Skip to content

Docsp 45382 comp cvg #654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 36 commits into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b44d8e7
TOC Reorg - Get Started (#407)
mongoKart Jan 10, 2025
48b8bec
DOCSP-48809 - Remove FAQs page (#553)
mongoKart Apr 2, 2025
d2b5421
DOCSP-48810 - Move usage examples (#554)
mongoKart Apr 2, 2025
d982c05
DOCSP-48812 - Match PyMongo TOC (#556)
mongoKart Apr 7, 2025
3f2c2ae
DOCSP-48984 - Add redirects for new TOC (#578)
mongoKart Apr 8, 2025
dae52bf
DOCSP-49067: Cursors (#584)
mcmorisi Apr 16, 2025
c0ae698
DOCSP-49095: Retryable Reads and Writes (#585)
mcmorisi Apr 16, 2025
012b476
DOCSP-49056: Server Selection (#618)
mcmorisi Apr 22, 2025
0d31887
DOCSP-49058: Connection Pools (#616)
mcmorisi Apr 24, 2025
9ddd74f
DOCSP-49230 - Aggregation stages (builders) (#591)
mongoKart Apr 29, 2025
785a11c
DOCSP-49635 - Aggregation stages fix (#624)
mongoKart Apr 30, 2025
473761b
DOCSP-49054: Connection targets (#589)
mcmorisi Apr 30, 2025
c233f4f
DOCSP-49078: Extended JSON (#619)
mcmorisi Apr 30, 2025
1fe89e9
DOCSP-49053: Standardize MongoClient page (#621)
mcmorisi May 1, 2025
92ff412
DOCSP-49089 - Authentication (Comprehensive Coverage) (#625)
mongoKart May 1, 2025
4a6a5bc
DOCSP-49096: Causal Consistency note (#579)
mcmorisi May 1, 2025
137151e
DOCSP-49082 - Indexes (Comprehensive Coverage) (#623)
mongoKart May 1, 2025
60e0cca
DOCSP-49811 - ClientSessionOptions (#627)
mongoKart May 8, 2025
502746c
DOCSP-49061 - Query filters (Comprehensive Coverage) (#620)
mongoKart May 8, 2025
e45e033
DOCSP-49849 - Collation (#628)
mongoKart May 22, 2025
7478472
DOCSP-49867: Add JsonReader example (#636)
mcmorisi May 23, 2025
e95a4e6
add linq page
mongoKart May 29, 2025
4e6c7ba
DOCSP-49876: Add IBsonReader and IBsonWriter info (#641)
mcmorisi May 30, 2025
ba55cde
DOCSP-50338: Reorganize Data Formats pages (#642)
mcmorisi Jun 2, 2025
aca2c08
DOCSP-49745: geoNear agg stage (#645)
rustagir Jun 9, 2025
8b08829
DOCSP-49085: Port existing Vector Search page (#643)
mcmorisi Jun 16, 2025
6286ca9
DOCSP-49868 - MongoUrl (#629)
mongoKart Jun 17, 2025
cd02f50
DOCSP-50749: agg tutorial link (#649)
rustagir Jun 17, 2025
3dbe87c
DOCSP-49786 - Meta projection methods (#644)
mongoKart Jul 1, 2025
87b5642
DOCSP-45382 - Specify Documents (#622)
mongoKart Jul 1, 2025
f387936
DOCSP-49647 - Clean up (#653)
mongoKart Jul 7, 2025
e9e767f
Merge remote-tracking branch 'upstream/master' into docsp-45382-comp-cvg
mongoKart Jul 8, 2025
c7efc91
fix broken links
mongoKart Jul 8, 2025
25814a2
autobuilder
mongoKart Jul 8, 2025
1c42449
remove dupe constant
mongoKart Jul 8, 2025
cc255d4
autobuilder
mongoKart Jul 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/intersphinx.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Weirdly, giza wants a non-empty list of two or more, so we have to include extraneous/unused one --hence the python
# Weirdly, giza wants a non-empty list of two or more, so we must include extraneous/unused one --hence the python
name: python
url: https://docs.python.org/2/
path: python2.inv
Expand Down
73 changes: 73 additions & 0 deletions config/redirects
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,76 @@ raw: ${prefix}/master -> ${base}/upcoming/
[*-v2.30]: ${prefix}/${version}/fundamentals/odata/ -> ${base}/${version}/
[*-v2.30]: ${prefix}/${version}/fundamentals/crud/write-operations/bulk-write/ -> ${base}/${version}/fundamentals/crud/write-operations/
[v2.22-v2.24]: ${prefix}/${version}/fundamentals/authentication/oidc/ -> ${base}/${version}/fundamentals/authentication/

# comprehensive coverage reorg
[*-master]: ${prefix}/${version}/fundamentals/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/fundamentals/connection/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/fundamentals/crud/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/fundamentals/crud/read-operations/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/usage-examples/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/get-started/create-connection-string/ -> ${base}/${version}/get-started/
[*-master]: ${prefix}/${version}/get-started/deploy-cluster/ -> ${base}/${version}/get-started/
[*-master]: ${prefix}/${version}/get-started/download-driver/ -> ${base}/${version}/get-started/
[*-master]: ${prefix}/${version}/get-started/run-sample-query/ -> ${base}/${version}/get-started/
[*-master]: ${prefix}/${version}/compatibility/ -> ${base}/${version}/reference/compatibility/
[*-master]: ${prefix}/${version}/previous-versions/ -> ${base}/${version}/reference/previous-versions/
[*-master]: ${prefix}/${version}/quick-reference/ -> ${base}/${version}/reference/quick-reference/
[*-master]: ${prefix}/${version}/whats-new/ -> ${base}/${version}/reference/release-notes/
[*-master]: ${prefix}/${version}/upgrade/ -> ${base}/${version}/reference/upgrade/
[*-master]: ${prefix}/${version}/upgrade/v2/ -> ${base}/${version}/reference/upgrade/v2/
[*-master]: ${prefix}/${version}/upgrade/v3/ -> ${base}/${version}/reference/upgrade/v3/
[*-master]: ${prefix}/${version}/fundamentals/linq/ -> ${base}/${version}/aggregation/
[*-master]: ${prefix}/${version}/fundamentals/aggregation/ -> ${base}/${version}/aggregation/
[*-master]: ${prefix}/${version}/fundamentals/odata/ -> ${base}/${version}/integrations/odata/
[*-master]: ${prefix}/${version}/fundamentals/indexes/ -> ${base}/${version}/indexes/
[*-master]: ${prefix}/${version}/fundamentals/atlas-search/ -> ${base}/${version}/atlas-search/
[*-master]: ${prefix}/${version}/fundamentals/builders/ -> ${base}/${version}/
[*-master]: ${prefix}/${version}/fundamentals/connection/connection-options/ -> ${base}/${version}/connect/connection-options/
[*-master]: ${prefix}/${version}/fundamentals/connection/connection-pools/ -> ${base}/${version}/connect/connection-options/connection-pools/
[*-master]: ${prefix}/${version}/fundamentals/connection/network-compression/ -> ${base}/${version}/connect/connection-options/network-compression/
[*-master]: ${prefix}/${version}/fundamentals/connection/server-selection/ -> ${base}/${version}/connect/connection-options/server-selection/
[*-master]: ${prefix}/${version}/fundamentals/connection/connect/ -> ${base}/${version}/connect/mongoclient/
[*-master]: ${prefix}/${version}/fundamentals/connection/tls/ -> ${base}/${version}/security/tls-ssl/
[*-master]: ${prefix}/${version}/fundamentals/read-write-configuration/ -> ${base}/${version}/crud/configure/
[*-master]: ${prefix}/${version}/connection-troubleshooting/ -> ${base}/${version}/connect/connection-troubleshooting/
[*-master]: ${prefix}/${version}/fundamentals/geo/ -> ${base}/${version}/crud/geo/
[*-master]: ${prefix}/${version}/fundamentals/stable-api/ -> ${base}/${version}/connect/connection-options/stable-api/
[*-master]: ${prefix}/${version}/fundamentals/gridfs/ -> ${base}/${version}/crud/gridfs/
[*-master]: ${prefix}/${version}/fundamentals/specify-query/ -> ${base}/${version}/crud/query/specify-query/
[*-master]: ${prefix}/${version}/fundamentals/transactions/ -> ${base}/${version}/crud/transactions/
[*-master]: ${prefix}/${version}/fundamentals/bson/ -> ${base}/${version}/document-formats/bson/
[*-master]: ${prefix}/${version}/fundamentals/time-series/ -> ${base}/${version}/time-series/
[*-master]: ${prefix}/${version}/fundamentals/logging/ -> ${base}/${version}/logging-and-monitoring/logging/
[*-master]: ${prefix}/${version}/fundamentals/monitoring/ -> ${base}/${version}/logging-and-monitoring/monitoring/
[*-master]: ${prefix}/${version}/fundamentals/database-collection/ -> ${base}/${version}/databases-collections/
[*-master]: ${prefix}/${version}/fundamentals/encrypt-fields/ -> ${base}/${version}/security/in-use-encryption/
[*-master]: ${prefix}/${version}/fundamentals/crud/read-operations/distinct/ -> ${base}/${version}/crud/query/distinct/
[*-master]: ${prefix}/${version}/fundamentals/crud/read-operations/retrieve/ -> ${base}/${version}/crud/query/find/
[*-master]: ${prefix}/${version}/fundamentals/crud/read-operations/project/ -> ${base}/${version}/crud/query/project/
[*-master]: ${prefix}/${version}/fundamentals/crud/read-operations/specify-documents-to-return/ -> ${base}/${version}/crud/query/specify-documents-to-return/
[*-master]: ${prefix}/${version}/fundamentals/crud/read-operations/change-streams/ -> ${base}/${version}/logging-and-monitoring/change-streams/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/insert/ -> ${base}/${version}/crud/insert/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/delete/ -> ${base}/${version}/crud/delete/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/bulk-write/ -> ${base}/${version}/bulk-write/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/replace/ -> ${base}/${version}/crud/replace/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-many/ -> ${base}/${version}/crud/update-many/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-many/arrays/ -> ${base}/${version}/crud/update-many/arrays/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-many/fields/ -> ${base}/${version}/crud/update-many/fields/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-one/ -> ${base}/${version}/crud/update-one/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-one/arrays/ -> ${base}/${version}/crud/update-one/arrays/
[*-master]: ${prefix}/${version}/fundamentals/crud/write-operations/update-one/fields/ -> ${base}/${version}/crud/update-one/fields/
[*-master]: ${prefix}/${version}/fundamentals/serialization/class-mapping/ -> ${base}/${version}/serialization/class-mapping/
[*-master]: ${prefix}/${version}/fundamentals/serialization/poco/ -> ${base}/${version}/serialization/poco/
[*-master]: ${prefix}/${version}/fundamentals/serialization/polymorphic-objects/ -> ${base}/${version}/serialization/polymorphic-objects/
[*-master]: ${prefix}/${version}/fundamentals/serialization/ -> ${base}/${version}/serialization/
[*-master]: ${prefix}/${version}/fundamentals/databases-collections/run-command/ -> ${base}/${version}/run-command/
[*-master]: ${prefix}/${version}/fundamentals/authentication/ -> ${base}/${version}/security/authentication/
[*-master]: ${prefix}/${version}/fundamentals/authentication/aws-iam/ -> ${base}/${version}/security/authentication/aws-iam/
[*-master]: ${prefix}/${version}/fundamentals/authentication/kerberos/ -> ${base}/${version}/security/authentication/kerberos/
[*-master]: ${prefix}/${version}/fundamentals/authentication/ldap/ -> ${base}/${version}/security/authentication/ldap/
[*-master]: ${prefix}/${version}/fundamentals/authentication/oidc/ -> ${base}/${version}/security/authentication/oidc/
[*-master]: ${prefix}/${version}/fundamentals/authentication/scram/ -> ${base}/${version}/security/authentication/scram/
[*-master]: ${prefix}/${version}/fundamentals/authentication/x509/ -> ${base}/${version}/security/authentication/x509/
[*-master]: ${prefix}/${version}/crud/query/specify-documents-to-return/ -> ${base}/${version}/crud/query/specify-documents/
[*-master]: ${prefix}/${version}/crud/query/specify-query/ -> ${base}/${version}/crud/query/query-filter/
20 changes: 8 additions & 12 deletions snooty.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
toc_landing_pages = [
"/fundamentals/connection",
"/fundamentals/crud",
"/usage-examples",
"/fundamentals",
"/fundamentals/serialization",
"/fundamentals/crud/write-operations/update-one",
"/fundamentals/crud/write-operations/update-many",
"/fundamentals/authentication",
"/upgrade",
"/fundamentals/database-collection",
"/fundamentals/indexes",
"/get-started",
"/connect/connection-options",
"/security/authentication",
"/aggregation",
"/aggregation/stages",
"/serialization",
"/indexes",
]
name = "csharp"
title = "C#/.NET Driver"
Expand Down Expand Up @@ -50,4 +46,4 @@ not-available = "N/A"
analyzer = "MongoDB C# Analyzer"
analyzer-short = "C# Analyzer"
query-api = "MongoDB Query API"
vector-search = "Atlas Vector Search"
avs = "Atlas Vector Search"
119 changes: 119 additions & 0 deletions source/aggregation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
.. _csharp-aggregation:

======================
Aggregation Operations
======================

.. facet::
:name: genre
:values: reference

.. meta::
:keywords: dotnet, code example, transform, pipeline

.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol

.. toctree::
:titlesonly:
:maxdepth: 1

Pipeline Stages </aggregation/stages>
LINQ </aggregation/linq>

Overview
--------

In this guide, you can learn how to use the {+driver-long+} to perform
**aggregation operations**.

Aggregation operations process data in your MongoDB collections and
return computed results. The MongoDB Aggregation framework is modeled on the
concept of data processing pipelines. Documents enter a pipeline comprised of one or
more stages, and this pipeline transforms the documents into an aggregated result.

To learn more about the aggregation stages supported by the {+driver-short+}, see
:ref:`Aggregation Stages <csharp-aggregation-stages>`.

.. sharedinclude:: dbx/agg-tutorials-manual-tip.rst

.. replacement:: language

:guilabel:`{+language+}`

Analogy
~~~~~~~

Aggregation operations function similarly to car factories with assembly
lines. The assembly lines have stations with specialized tools to
perform specific tasks. For example, when building a car, the assembly
line begins with the frame. Then, as the car frame moves through the
assembly line, each station assembles a separate part. The result is a
transformed final product, the finished car.

The assembly line represents the *aggregation pipeline*, the individual
stations represent the *aggregation stages*, the specialized tools
represent the *expression operators*, and the finished product
represents the *aggregated result*.

Compare Aggregation and Find Operations
---------------------------------------

The following table lists the different tasks you can perform with find
operations, compared to what you can achieve with aggregation
operations. The aggregation framework provides expanded functionality
that allows you to transform and manipulate your data.

.. list-table::
:header-rows: 1
:widths: 50 50

* - Find Operations
- Aggregation Operations

* - | Select *certain* documents to return
| Select *which* fields to return
| Sort the results
| Limit the results
| Count the results
- | Select *certain* documents to return
| Select *which* fields to return
| Sort the results
| Limit the results
| Count the results
| Group the results
| Rename fields
| Compute new fields
| Summarize data
| Connect and merge data sets

Server Limitations
------------------

Consider the following :manual:`limitations </core/aggregation-pipeline-limits/>` when
performing aggregation operations:

- Returned documents must not violate the :manual:`BSON document size limit </reference/limits/#mongodb-limit-BSON-Document-Size>`
of 16 megabytes.

- Pipeline stages have a memory limit of 100 megabytes by default. If required, you can exceed this limit by setting
the `AllowDiskUse <{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.AggregateOptions.AllowDiskUse.html#MongoDB_Driver_AggregateOptions_AllowDiskUse>`__
property of the ``AggregateOptions`` object that you pass to the ``Aggregate()`` method.

Troubleshooting
---------------

.. include:: /includes/troubleshooting/unsupported-filter-expression.rst

Additional Information
----------------------

To view a full list of expression operators, see
:manual:`Aggregation Operators </reference/operator/aggregation/>`.

To learn about explaining MongoDB aggregation operations, see
:manual:`Explain Results </reference/explain-results/>` and
:manual:`Query Plans </core/query-plans/>`.
7 changes: 5 additions & 2 deletions source/fundamentals/linq.txt → source/aggregation/linq.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.. _csharp-linq:

======================================
LINQ Syntax for Aggregation Operations
======================================
======================================
LINQ Syntax for Aggregation Operations
======================================
Expand Down Expand Up @@ -36,7 +39,7 @@ The {+driver-short+} automatically translates LINQ queries into
The examples in this guide use the ``restaurants`` collection
in the ``sample_restaurants`` database provided in the :atlas:`Atlas sample datasets </sample-data>`.
To learn how to create a free MongoDB Atlas cluster and load the sample datasets,
see the :ref:`<csharp-quickstart>`.
see :ref:`<csharp-get-started>`.

The following ``Restaurant``, ``Address`` and ``GradeEntry`` classes model the
documents in this collection:
Expand Down Expand Up @@ -1025,7 +1028,7 @@ aggregation stages:
- ``$out``

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

Supported Methods
-----------------
Expand Down
Loading
Loading