@@ -215,10 +215,49 @@ first element in the ``categories`` field.
215
215
Results(name=456 Cookies Shop, firstCategory=Bakery)
216
216
Results(name=XYZ Steak Buffet, firstCategory=Steak)
217
217
218
+ .. _kotlin-cr-atlas-search-stage:
219
+
220
+ Pipelines Stages for Atlas Search
221
+ ---------------------------------
222
+
223
+ :atlas:`Atlas Search </atlas-search>` queries take the form of an aggregation pipeline stage. Atlas
224
+ Search provides ``$search`` and ``$searchMeta`` stages, both of which must be the first
225
+ stage in any query pipeline. For more information about Atlas pipeline stages,
226
+ see the :atlas:`Choose the Aggregation Pipeline Stage
227
+ </atlas-search/query-syntax/>` page in the Atlas
228
+ manual.
229
+
230
+ .. sharedinclude:: dbx/jvm/atlas-search-operator-helpers.rst
231
+
232
+ .. replacement:: atlas-query-operators-example
233
+
234
+ .. code-block:: kotlin
235
+
236
+ val searchStage: Bson = Aggregates.search(
237
+ SearchOperator.compound()
238
+ .filter(
239
+ listOf(
240
+ SearchOperator.text(fieldPath("genres"), "Drama"),
241
+ SearchOperator.phrase(fieldPath("cast"), "sylvester stallone"),
242
+ SearchOperator.numberRange(fieldPath("year")).gtLt(1980, 1989),
243
+ SearchOperator.wildcard(fieldPath("title"), "Rocky *")
244
+ )
245
+ )
246
+ )
247
+
248
+ .. replacement:: searchoperator-interface-api-docs
249
+
250
+ the `SearchOperator Interface API documentation
251
+ <{+core-api+}/com/mongodb/client/model/search/SearchOperator.html>`__
252
+
253
+ API Documentation
254
+ -----------------
255
+
218
256
For more information about the methods and classes mentioned in this section,
219
257
see the following API Documentation:
220
258
221
259
- `Accumulators <{+core-api+}/client/model/Accumulators.html>`__
222
260
- `$group <{+core-api+}/client/model/Aggregates.html#group(TExpression,java.util.List)>`__
223
261
- `$project <{+core-api+}/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`__
224
262
- `Projections <{+core-api+}/client/model/Projections.html>`__
263
+ - `SearchOperator Interface <{+core-api+}/com/mongodb/client/model/search/SearchOperator.html>`__
0 commit comments