Skip to content

Commit e5bcf39

Browse files
committed
aggregation section
1 parent aa84832 commit e5bcf39

File tree

4 files changed

+34
-78
lines changed

4 files changed

+34
-78
lines changed

source/aggregation.txt

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Transform Your Data with Aggregation
99
:values: reference
1010

1111
.. meta::
12-
:keywords: code example, transform, computed, pipeline
12+
:keywords: code example, transform, computed, pipeline, Atlas Search
1313
:description: Learn how to use the Kotlin Sync driver to perform aggregation operations.
1414

1515
.. contents:: On this page
@@ -80,6 +80,37 @@ The following limitations apply when using aggregation operations:
8080
</reference/operator/aggregation/graphLookup/>` stage has a strict
8181
memory limit of 100 megabytes and ignores the ``allowDiskUse`` option.
8282

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+
83114
Aggregation Example
84115
-------------------
85116

source/atlas-search.txt

Lines changed: 0 additions & 75 deletions
This file was deleted.

source/index.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
Specialized Data Formats </data-formats>
2424
Builders </builders>
2525
Run a Command </run-command>
26-
Atlas Search </atlas-search>
2726
Monitoring </monitoring>
2827
Security </security>
2928
In-Use Encryption </security/encrypt-fields>

source/whats-new.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ and features:
4444

4545
.. replacement:: atlas-query-operators
4646

47-
the :ref:`Atlas Search <kotlin-sync-atlas-search>`
47+
the :ref:`Pipeline Stages for Atlas Search
48+
<kotlin-sync-atlas-search-stage>` section
4849

4950
.. _kotlin-sync-version-5.3:
5051

0 commit comments

Comments
 (0)