@@ -9,7 +9,7 @@ Transform Your Data with Aggregation
9
9
:values: reference
10
10
11
11
.. meta::
12
- :keywords: code example, transform, computed, pipeline
12
+ :keywords: code example, transform, computed, pipeline, Atlas Search
13
13
:description: Learn how to use the Kotlin Sync driver to perform aggregation operations.
14
14
15
15
.. contents:: On this page
@@ -80,6 +80,37 @@ The following limitations apply when using aggregation operations:
80
80
</reference/operator/aggregation/graphLookup/>` stage has a strict
81
81
memory limit of 100 megabytes and ignores the ``allowDiskUse`` option.
82
82
83
+ .. _kotlin-sync-atlas-search-stage:
84
+
85
+ Building Pipelines Stages for Atlas Search
86
+ ------------------------------------------
87
+
88
+ Atlas Search queries take the form of an aggregation pipeline stage. Atlas
89
+ Search provides ``$search`` and ``$searchMeta`` stages, both of which must be the first
90
+ stage in any query pipeline. For more information about Atlas pipeline stages, see the :atlas:`Choose the
91
+ Aggregation Pipeline Stage </atlas-search/query-syntax/>`__ page in the Atlas
92
+ manual.
93
+
94
+ .. sharedinclude:: dbx/jvm/atlas-search-operator-helpers.rst
95
+
96
+ .. replacement:: atlas-query-operators-example
97
+
98
+ .. code-block:: kotlin
99
+
100
+ Bson searchStageFilters = Aggregates.search(
101
+ SearchOperator.compound()
102
+ .filter(
103
+ List.of(
104
+ SearchOperator.text(fieldPath("genres"), "Drama"),
105
+ SearchOperator.phrase(fieldPath("cast"), "sylvester stallone"),
106
+ SearchOperator.numberRange(fieldPath("year")).gtLt(1980, 1989),
107
+ SearchOperator.wildcard(fieldPath("title"),"Rocky *")
108
+ )));
109
+
110
+ .. replacement:: searchoperator-interface-api-docs
111
+
112
+ the `SearchOperator Interface API documentation <{+core-api+}/com/mongodb/client/model/search/SearchOperator.html>`__
113
+
83
114
Aggregation Example
84
115
-------------------
85
116
0 commit comments