Skip to content

Commit 7b58d7a

Browse files
committed
tech review
1 parent e2c5332 commit 7b58d7a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

source/atlas-search.txt

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Run an Atlas Search Query
3939
-------------------------
4040

4141
This section shows how to create an aggregation pipeline to run an
42-
Atlas Search on a collection. You can use the ``Aggregates.search()`` builder
42+
Atlas Search query on a collection. You can use the ``Aggregates.search()`` builder
4343
method to create a ``$search`` pipeline stage, which specifies the search
4444
criteria. Then, call the ``aggregate()`` method and pass your pipeline as a parameter.
4545

@@ -55,13 +55,17 @@ index, see the :ref:`java-search-indexes` section in the Indexes guide.
5555
Atlas Search Example
5656
~~~~~~~~~~~~~~~~~~~~
5757

58-
This example performs an Atlas Search query by calling the
59-
``aggregate()`` method and passing the following pipeline stage
60-
builders:
58+
This example runs an Atlas Search query by performing the
59+
following actions:
6160

62-
- ``Aggregates.search()``: Specifies a search query for documents in which
63-
the ``title`` field contains the word ``"Alabama"``
64-
- ``Aggregates.project()``: Projects the ``title`` field of each matching document
61+
- Constructs a ``$search`` stage by using the ``Aggregates.search()`` builder method,
62+
instructing the driver to query for documents in which the ``title``
63+
field contains the word ``"Alabama"``
64+
65+
- Constructs a ``$project`` stage by using the ``Aggregates.project()`` builder method,
66+
instructing the driver to include the ``title`` field in the query results
67+
68+
- Passes the pipeline stages to the ``aggregate()`` method and prints the results
6569

6670
.. io-code-block::
6771
:copyable:

0 commit comments

Comments
 (0)