File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,15 @@ Run an Atlas Search Query
39
39
-------------------------
40
40
41
41
This section shows how to create an aggregation pipeline to run an
42
- Atlas Search query on a collection. In your array of pipeline stages,
43
- add the ``$search`` stage to specify the search criteria. Then, call
42
+ Atlas Search query on a collection.
43
+
44
+ To run an Atlas Search query, you must create an Atlas Search index on your
45
+ collection. To learn how to programmatically create
46
+ an Atlas Search index, see the :ref:`golang-atlas-search-indexes` section of the
47
+ Indexes guide.
48
+
49
+ After you create an Atlas Search index, add the ``$search`` stage in your array
50
+ of pipeline stages to specify the search criteria. Then, call
44
51
the ``Aggregate()`` method and pass your pipeline array as a parameter.
45
52
46
53
.. tip::
@@ -97,8 +104,9 @@ following actions:
97
104
Additional Information
98
105
----------------------
99
106
100
- To learn more about Atlas Search, see :atlas:`Atlas Search </atlas-search/>`
101
- in the Atlas documentation.
107
+ To learn more about Atlas Search, see the :atlas:`Atlas Search </atlas-search/>`
108
+ guides and the :atlas:`$search </atlas-search/aggregation-stages/search/>` pipeline
109
+ stage reference in the Atlas documentation.
102
110
103
111
API Documentation
104
112
~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments