Skip to content

Commit 3dbe87c

Browse files
authored
DOCSP-49786 - Meta projection methods (#644)
1 parent cd02f50 commit 3dbe87c

File tree

14 files changed

+903
-224
lines changed

14 files changed

+903
-224
lines changed

source/aggregation.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Aggregation Operations
2222
:maxdepth: 1
2323

2424
Pipeline Stages </aggregation/stages>
25+
LINQ </aggregation/linq>
2526

2627
Overview
2728
--------

source/aggregation/linq.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The {+driver-short+} automatically translates LINQ queries into
3636
The examples in this guide use the ``restaurants`` collection
3737
in the ``sample_restaurants`` database provided in the :atlas:`Atlas sample datasets </sample-data>`.
3838
To learn how to create a free MongoDB Atlas cluster and load the sample datasets,
39-
see the :ref:`<csharp-quickstart>`.
39+
see :ref:`<csharp-get-started>`.
4040

4141
The following ``Restaurant``, ``Address`` and ``GradeEntry`` classes model the
4242
documents in this collection:
@@ -1025,7 +1025,7 @@ aggregation stages:
10251025
- ``$out``
10261026

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

10301030
Supported Methods
10311031
-----------------

source/aggregation/stages.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.. _csharp-aggregation-stages:
22
.. _csharp-builders-aggregation:
3-
.. _csharp-linq:
43

54
===========================
65
Aggregation Pipeline Stages

source/atlas-search.txt

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The examples in this guide use the following documents in a collection called
3838
``guitars``:
3939

4040
.. code-block:: json
41-
41+
4242
{ "_id": 1, "make": "Fender", "description": "Classic guitars known for their versatility.", "establishedYear": 1946, "in_stock": true, "rating": 9 }
4343
{ "_id": 2, "make": "Gibson", "description": "Classic guitars known for their rich, full tones.", "establishedYear": 1902, "in_stock": true, "rating": 8 }
4444
{ "_id": 3, "make": "PRS", "description": "High-end guitars known for their quality.", "establishedYear": 1985, "in_stock": true, "rating": 9 }
@@ -75,7 +75,7 @@ Create an Atlas Search Index
7575

7676
Before you can perform a search on an Atlas collection, you must first create an **Atlas
7777
Search index** on the collection. An Atlas Search index is a data structure that
78-
categorizes data in a searchable format.
78+
categorizes data in a searchable format.
7979

8080
To learn how to create an Atlas Search Index see the
8181
:atlas:`Create an Atlas Search Index </atlas-search/create-index>` Atlas guide.
@@ -103,7 +103,7 @@ collection using the string "Gib" in the ``make`` field.
103103
:dedent:
104104

105105
.. note::
106-
106+
107107
If the field you are searching on is indexed by a search index, you must pass the index name to the ``Autocomplete`` call. If a search index does not exist, the default index is used.
108108

109109
The search returns the following document:
@@ -112,7 +112,7 @@ The search returns the following document:
112112

113113
{ "_id" : 2, "make" : "Gibson", "description" : "Classic guitars known for their rich, full tones.", "establishedYear" : 1902, "in_stock" : true, "rating" : 8 }
114114

115-
To learn more about the ``autocomplete`` operator, see the :atlas:`autocomplete </atlas-search/autocomplete>`
115+
To learn more about the ``autocomplete`` operator, see the :atlas:`autocomplete </atlas-search/autocomplete>`
116116
Atlas guide.
117117

118118
Compound
@@ -142,7 +142,7 @@ The search returns the following documents:
142142
{ "_id" : 3, "make" : "PRS", "description" : "...", "establishedYear" : 1985, "in_stock" : true, "rating" : 9 }
143143
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
144144

145-
To learn more about the ``compound`` operator, see the :atlas:`compound </atlas-search/compound>`
145+
To learn more about the ``compound`` operator, see the :atlas:`compound </atlas-search/compound>`
146146
Atlas guide.
147147

148148
EmbeddedDocument
@@ -153,7 +153,7 @@ within a field's array value.
153153

154154
.. note::
155155

156-
To search on embedded documents, you must create an
156+
To search on embedded documents, you must create an
157157
``embeddedDocument`` index on the array field.
158158

159159
To learn how to define an ``embeddedDocument`` index, see
@@ -218,7 +218,7 @@ The search returns the following documents:
218218
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
219219

220220

221-
To learn more about the ``equals`` operator, see the :atlas:`equals </atlas-search/equals>`
221+
To learn more about the ``equals`` operator, see the :atlas:`equals </atlas-search/equals>`
222222
Atlas guide.
223223

224224
Exists
@@ -246,8 +246,7 @@ The search returns the following documents:
246246
{ "_id" : 3, "make" : "PRS", "description" : "...", "establishedYear" : 1985, "in_stock" : true, "rating" : 9 }
247247
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
248248

249-
250-
To learn more about the ``exists`` operator, see the :atlas:`exists </atlas-search/exists>`
249+
To learn more about the ``exists`` operator, see the :atlas:`exists </atlas-search/exists>`
251250
Atlas guide.
252251

253252
GeoShape
@@ -266,7 +265,7 @@ Consider some documents in the ``guitars`` collection have added an
266265
follows:
267266

268267
.. code-block:: json
269-
268+
270269
{ "_id": 1, "make": "Fender", "description": "...", "establishedYear": 1946, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ -73.93615, 40.69791 ]}, "rating": 9 }
271270
{ "_id": 2, "make": "Gibson", "description": "...", "establishedYear": 1902, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ 47.6062, 122.321 ]}, "rating": 8 }
272271

@@ -286,7 +285,7 @@ The search returns the following document:
286285

287286
{ "_id" : 1, "make" : "Fender", "description" : "...", "establishedYear" : 1946, "in_stock" : true, "in_stock_location" : { "type" : "Point", "coordinates" : ["-73.93615", "40.69791"] }, "rating" : 9 }
288287

289-
To learn more about the ``geoShape`` operator, see the :atlas:`geoShape </atlas-search/geoShape>`
288+
To learn more about the ``geoShape`` operator, see the :atlas:`geoShape </atlas-search/geoShape>`
290289
Atlas guide.
291290

292291
GeoWithin
@@ -312,13 +311,13 @@ Consider some documents in the ``guitars`` collection have added an
312311
follows:
313312

314313
.. code-block:: json
315-
314+
316315
{ "_id": 1, "make": "Fender", "description": "...", "establishedYear": 1946, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ -73.93615, 40.69791 ]}, "rating": 9 }
317316
{ "_id": 2, "make": "Gibson", "description": "...", "establishedYear": 1902, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ 47.6062, 122.321 ]}, "rating": 8 }
318317

319318
The following example searches for all documents in which the
320319
coordinates in the ``in_stock_location`` field falls within a specified
321-
polygon:
320+
polygon:
322321

323322
.. literalinclude:: /includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs
324323
:start-after: // start-geowithin-search
@@ -332,7 +331,7 @@ The search returns the following document:
332331

333332
{ "_id" : 1, "make" : "Fender", "description" : "Classic guitars known for their versatility.", "establishedYear" : 1946, "in_stock" : true, "in_stock_location" : { "type" : "Point", "coordinates" : ["-73.93615", "40.69791"] }, "rating" : 9 }
334333

335-
To learn more about the ``geoWithin`` operator, see the :atlas:`geoWithin </atlas-search/geoWithin>`
334+
To learn more about the ``geoWithin`` operator, see the :atlas:`geoWithin </atlas-search/geoWithin>`
336335
Atlas guide.
337336

338337
In
@@ -381,7 +380,7 @@ The search returns the following documents:
381380
{ "_id" : 4, "make" : "Kiesel", "description" : "Quality guitars made only for custom orders.", "establishedYear" : 2015, "in_stock" : false, "rating" : null }
382381

383382

384-
To learn more about the ``moreLikeThis`` operator, see the :atlas:`moreLikeThis </atlas-search/morelikethis>`
383+
To learn more about the ``moreLikeThis`` operator, see the :atlas:`moreLikeThis </atlas-search/morelikethis>`
385384
Atlas guide.
386385

387386
Near
@@ -414,7 +413,7 @@ The search returns the following documents:
414413
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
415414

416415

417-
To learn more about the ``near`` operator, see the :atlas:`near </atlas-search/near>`
416+
To learn more about the ``near`` operator, see the :atlas:`near </atlas-search/near>`
418417
Atlas guide.
419418

420419
Phrase
@@ -456,7 +455,7 @@ This search returns the following documents:
456455
{ "_id" : 4, "make" : "Kiesel", "description" : "Quality guitars made only for custom orders.", "establishedYear" : 2015, "in_stock" : false, "rating" : null }
457456
{ "_id" : 2, "make" : "Gibson", "description" : "Classic guitars known for their rich, full tones.", "establishedYear" : 1902, "in_stock" : true, "rating" : 8 }
458457

459-
To learn more about the ``phrase`` operator, see the :atlas:`phrase </atlas-search/phrase>`
458+
To learn more about the ``phrase`` operator, see the :atlas:`phrase </atlas-search/phrase>`
460459
Atlas guide.
461460

462461
QueryString
@@ -466,7 +465,7 @@ Use the ``QueryString()`` method to search for documents using a string with
466465
the following operators and delimiters:
467466

468467
- ``AND``
469-
- ``OR``
468+
- ``OR``
470469
- ``NOT``
471470
- ``()``
472471

@@ -490,7 +489,7 @@ The search returns the following documents:
490489
{ "_id" : 3, "make" : "PRS", "description" : "High-end guitars known for their quality.", "establishedYear" : 1985, "in_stock" : true, "rating" : 9 }
491490
{ "_id" : 2, "make" : "Gibson", "description" : "Classic guitars known for their rich, full tones.", "establishedYear" : 1902, "in_stock" : true, "rating" : 8 }
492491

493-
To learn more about the ``queryString`` operator, see the :atlas:`queryString </atlas-search/queryString>`
492+
To learn more about the ``queryString`` operator, see the :atlas:`queryString </atlas-search/queryString>`
494493
Atlas guide.
495494

496495
Range
@@ -516,7 +515,7 @@ The search returns the following results:
516515
{ "_id" : 4, "make" : "Kiesel", "description" : "Quality guitars made only for custom orders.", "establishedYear" : 2015, "in_stock" : false, "rating" : null }
517516
{ "_id" : 6, "make" : "Strandberg", "description" : "Modern guitars known for their headless models.", "establishedYear" : 1982, "in_stock" : false, "rating" : null }
518517

519-
To learn more about the ``range`` operator, see the :atlas:`range </atlas-search/range>`
518+
To learn more about the ``range`` operator, see the :atlas:`range </atlas-search/range>`
520519
Atlas guide.
521520

522521
Regex
@@ -558,7 +557,7 @@ The search returns the following results:
558557
search results. To learn more, see :atlas:`regex Behavior
559558
</atlas-search/regex/#behavior>`.
560559

561-
To learn more about the ``regex`` operator, see the :atlas:`regex </atlas-search/regex>`
560+
To learn more about the ``regex`` operator, see the :atlas:`regex </atlas-search/regex>`
562561
Atlas guide.
563562

564563
Span
@@ -593,7 +592,7 @@ Although the document with ``_id: 3`` contains the strings "guitars" and
593592
"quality", they are separated by more than one word, so the search omits this
594593
document from the results.
595594

596-
To learn more about the ``span`` operator, see the :atlas:`span </atlas-search/span>`
595+
To learn more about the ``span`` operator, see the :atlas:`span </atlas-search/span>`
597596
Atlas guide.
598597

599598
Text
@@ -624,7 +623,7 @@ The search returns the following document:
624623
If your search string contains multiple terms, the method also looks for a match
625624
for each term in the string separately.
626625

627-
To learn more about the ``text`` operator, see the :atlas:`text </atlas-search/text>`
626+
To learn more about the ``text`` operator, see the :atlas:`text </atlas-search/text>`
628627
Atlas guide.
629628

630629
Wildcard
@@ -640,7 +639,7 @@ characters in your search:
640639

641640
* - Character
642641
- Description
643-
642+
644643
* - ``?``
645644
- Matches any single character
646645

@@ -681,35 +680,5 @@ The search returns the following document:
681680
search results. To learn more, see :atlas:`wildcard Behavior
682681
</atlas-search/wildcard/#behavior>`.
683682

684-
To learn more about the ``wildcard`` operator, see the :atlas:`wildcard </atlas-search/wildcard>`
685-
Atlas guide.
686-
687-
.. TODO: integrate into existing page
688-
689-
Sample Class
690-
------------
691-
692-
The code examples in this guide demonstrate how you can use builders to
693-
create types to interact with documents in the sample collection ``plants.flowers``.
694-
Documents in this collection are modeled by the following ``Flower`` class:
695-
696-
.. literalinclude:: /includes/fundamentals/code-examples/builders.cs
697-
:language: csharp
698-
:dedent:
699-
:start-after: start-model
700-
:end-before: end-model
701-
702-
Each builder class takes a generic type parameter
703-
``TDocument`` which represents the type of document that you are working
704-
with. In this guide, the ``Flower`` class is the document type used in
705-
each builder class example.
706-
707-
Build an Atlas Search Query
708-
---------------------------
709-
710-
The ``Search`` class provides a type-safe interface for creating a
711-
:manual:`$search </reference/operator/aggregation/search/>`
712-
pipeline stage.
713-
714-
To learn how to construct search queries with the ``Search`` class, see
715-
:ref:`csharp-atlas-search`.
683+
To learn more about the ``wildcard`` operator, see the :atlas:`wildcard </atlas-search/wildcard>`
684+
Atlas guide.

source/atlas-vector-search.txt

Lines changed: 57 additions & 30 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)