@@ -38,7 +38,7 @@ The examples in this guide use the following documents in a collection called
38
38
``guitars``:
39
39
40
40
.. code-block:: json
41
-
41
+
42
42
{ "_id": 1, "make": "Fender", "description": "Classic guitars known for their versatility.", "establishedYear": 1946, "in_stock": true, "rating": 9 }
43
43
{ "_id": 2, "make": "Gibson", "description": "Classic guitars known for their rich, full tones.", "establishedYear": 1902, "in_stock": true, "rating": 8 }
44
44
{ "_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
75
75
76
76
Before you can perform a search on an Atlas collection, you must first create an **Atlas
77
77
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.
79
79
80
80
To learn how to create an Atlas Search Index see the
81
81
: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.
103
103
:dedent:
104
104
105
105
.. note::
106
-
106
+
107
107
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.
108
108
109
109
The search returns the following document:
@@ -112,7 +112,7 @@ The search returns the following document:
112
112
113
113
{ "_id" : 2, "make" : "Gibson", "description" : "Classic guitars known for their rich, full tones.", "establishedYear" : 1902, "in_stock" : true, "rating" : 8 }
114
114
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>`
116
116
Atlas guide.
117
117
118
118
Compound
@@ -142,7 +142,7 @@ The search returns the following documents:
142
142
{ "_id" : 3, "make" : "PRS", "description" : "...", "establishedYear" : 1985, "in_stock" : true, "rating" : 9 }
143
143
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
144
144
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>`
146
146
Atlas guide.
147
147
148
148
EmbeddedDocument
@@ -153,7 +153,7 @@ within a field's array value.
153
153
154
154
.. note::
155
155
156
- To search on embedded documents, you must create an
156
+ To search on embedded documents, you must create an
157
157
``embeddedDocument`` index on the array field.
158
158
159
159
To learn how to define an ``embeddedDocument`` index, see
@@ -218,7 +218,7 @@ The search returns the following documents:
218
218
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
219
219
220
220
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>`
222
222
Atlas guide.
223
223
224
224
Exists
@@ -246,8 +246,7 @@ The search returns the following documents:
246
246
{ "_id" : 3, "make" : "PRS", "description" : "...", "establishedYear" : 1985, "in_stock" : true, "rating" : 9 }
247
247
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
248
248
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>`
251
250
Atlas guide.
252
251
253
252
GeoShape
@@ -266,7 +265,7 @@ Consider some documents in the ``guitars`` collection have added an
266
265
follows:
267
266
268
267
.. code-block:: json
269
-
268
+
270
269
{ "_id": 1, "make": "Fender", "description": "...", "establishedYear": 1946, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ -73.93615, 40.69791 ]}, "rating": 9 }
271
270
{ "_id": 2, "make": "Gibson", "description": "...", "establishedYear": 1902, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ 47.6062, 122.321 ]}, "rating": 8 }
272
271
@@ -286,7 +285,7 @@ The search returns the following document:
286
285
287
286
{ "_id" : 1, "make" : "Fender", "description" : "...", "establishedYear" : 1946, "in_stock" : true, "in_stock_location" : { "type" : "Point", "coordinates" : ["-73.93615", "40.69791"] }, "rating" : 9 }
288
287
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>`
290
289
Atlas guide.
291
290
292
291
GeoWithin
@@ -312,13 +311,13 @@ Consider some documents in the ``guitars`` collection have added an
312
311
follows:
313
312
314
313
.. code-block:: json
315
-
314
+
316
315
{ "_id": 1, "make": "Fender", "description": "...", "establishedYear": 1946, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ -73.93615, 40.69791 ]}, "rating": 9 }
317
316
{ "_id": 2, "make": "Gibson", "description": "...", "establishedYear": 1902, "in_stock": true, "in_stock_location": { "type": "Point", "coordinates": [ 47.6062, 122.321 ]}, "rating": 8 }
318
317
319
318
The following example searches for all documents in which the
320
319
coordinates in the ``in_stock_location`` field falls within a specified
321
- polygon:
320
+ polygon:
322
321
323
322
.. literalinclude:: /includes/fundamentals/code-examples/atlas-search/AtlasSearchExamples.cs
324
323
:start-after: // start-geowithin-search
@@ -332,7 +331,7 @@ The search returns the following document:
332
331
333
332
{ "_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 }
334
333
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>`
336
335
Atlas guide.
337
336
338
337
In
@@ -381,7 +380,7 @@ The search returns the following documents:
381
380
{ "_id" : 4, "make" : "Kiesel", "description" : "Quality guitars made only for custom orders.", "establishedYear" : 2015, "in_stock" : false, "rating" : null }
382
381
383
382
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>`
385
384
Atlas guide.
386
385
387
386
Near
@@ -414,7 +413,7 @@ The search returns the following documents:
414
413
{ "_id" : 5, "make" : "Ibanez", "description" : "...", "establishedYear" : 1957, "in_stock" : true, "rating" : 7 }
415
414
416
415
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>`
418
417
Atlas guide.
419
418
420
419
Phrase
@@ -456,7 +455,7 @@ This search returns the following documents:
456
455
{ "_id" : 4, "make" : "Kiesel", "description" : "Quality guitars made only for custom orders.", "establishedYear" : 2015, "in_stock" : false, "rating" : null }
457
456
{ "_id" : 2, "make" : "Gibson", "description" : "Classic guitars known for their rich, full tones.", "establishedYear" : 1902, "in_stock" : true, "rating" : 8 }
458
457
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>`
460
459
Atlas guide.
461
460
462
461
QueryString
@@ -466,7 +465,7 @@ Use the ``QueryString()`` method to search for documents using a string with
466
465
the following operators and delimiters:
467
466
468
467
- ``AND``
469
- - ``OR``
468
+ - ``OR``
470
469
- ``NOT``
471
470
- ``()``
472
471
@@ -490,7 +489,7 @@ The search returns the following documents:
490
489
{ "_id" : 3, "make" : "PRS", "description" : "High-end guitars known for their quality.", "establishedYear" : 1985, "in_stock" : true, "rating" : 9 }
491
490
{ "_id" : 2, "make" : "Gibson", "description" : "Classic guitars known for their rich, full tones.", "establishedYear" : 1902, "in_stock" : true, "rating" : 8 }
492
491
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>`
494
493
Atlas guide.
495
494
496
495
Range
@@ -516,7 +515,7 @@ The search returns the following results:
516
515
{ "_id" : 4, "make" : "Kiesel", "description" : "Quality guitars made only for custom orders.", "establishedYear" : 2015, "in_stock" : false, "rating" : null }
517
516
{ "_id" : 6, "make" : "Strandberg", "description" : "Modern guitars known for their headless models.", "establishedYear" : 1982, "in_stock" : false, "rating" : null }
518
517
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>`
520
519
Atlas guide.
521
520
522
521
Regex
@@ -558,7 +557,7 @@ The search returns the following results:
558
557
search results. To learn more, see :atlas:`regex Behavior
559
558
</atlas-search/regex/#behavior>`.
560
559
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>`
562
561
Atlas guide.
563
562
564
563
Span
@@ -593,7 +592,7 @@ Although the document with ``_id: 3`` contains the strings "guitars" and
593
592
"quality", they are separated by more than one word, so the search omits this
594
593
document from the results.
595
594
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>`
597
596
Atlas guide.
598
597
599
598
Text
@@ -624,7 +623,7 @@ The search returns the following document:
624
623
If your search string contains multiple terms, the method also looks for a match
625
624
for each term in the string separately.
626
625
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>`
628
627
Atlas guide.
629
628
630
629
Wildcard
@@ -640,7 +639,7 @@ characters in your search:
640
639
641
640
* - Character
642
641
- Description
643
-
642
+
644
643
* - ``?``
645
644
- Matches any single character
646
645
@@ -681,35 +680,5 @@ The search returns the following document:
681
680
search results. To learn more, see :atlas:`wildcard Behavior
682
681
</atlas-search/wildcard/#behavior>`.
683
682
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.
0 commit comments