Skip to content

Commit 9d82000

Browse files
DOCSP-33295 Allow user to Run Aggregate (#599)
* DOCSP-33295 Allow user to Run Aggregate * DOCSP-33295 updates for LT's copy feedback
1 parent 6e7a03f commit 9d82000

File tree

3 files changed

+100
-8
lines changed

3 files changed

+100
-8
lines changed

source/indexes/create-search-index.txt

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.. _compass-create-search-index:
22

3-
============================
4-
Create an Atlas Search Index
5-
============================
3+
=======================================
4+
Create and Manage an Atlas Search Index
5+
=======================================
66

77
.. contents:: On this page
88
:local:
99
:backlinks: none
10-
:depth: 1
10+
:depth: 2
1111
:class: singlecol
1212

1313
.. versionadded:: 1.40.0
@@ -31,8 +31,11 @@ To create an Atlas Search index, your deployment must be either:
3131

3232
Additionally, your deployment must run MongoDB version 7.0 or later.
3333

34-
Steps
35-
-----
34+
Procedures
35+
----------
36+
37+
Create an Index
38+
~~~~~~~~~~~~~~~
3639

3740
.. procedure::
3841
:style: normal
@@ -53,7 +56,7 @@ Steps
5356
.. step:: Click :guilabel:`Create Search Index`
5457

5558
Example
56-
-------
59+
```````
5760

5861
The following example definition creates a search index that indexes all
5962
fields:
@@ -65,7 +68,7 @@ fields:
6568
}
6669

6770
Results
68-
-------
71+
```````
6972

7073
To view the status of your created index, go to the :guilabel:`Indexes`
7174
tab and set the toggle at the top-right to :guilabel:`Search Indexes`.
@@ -76,6 +79,34 @@ the status is :guilabel:`Ready`, your index is ready to be used.
7679
For more information on search index statuses, see
7780
:ref:`search-index-status`.
7881

82+
Edit an Index
83+
~~~~~~~~~~~~~
84+
85+
.. procedure::
86+
:style: normal
87+
88+
.. step:: From the :guilabel:`Indexes` tab, click :guilabel:`Search Indexes`.
89+
90+
.. step:: Hover over the index you want to edit.
91+
92+
.. step:: Click the pencil icon to open the :guilabel:`Edit` dialog.
93+
94+
.. step:: Make the changes and click :guilabel:`Save`.
95+
96+
Delete an Index
97+
~~~~~~~~~~~~~~~
98+
99+
.. procedure::
100+
:style: normal
101+
102+
.. step:: From the :guilabel:`Indexes` tab, click :guilabel:`Search Indexes`.
103+
104+
.. step:: Hover over the index you want to delete.
105+
106+
.. step:: Click the trash icon to open the confirmation dialog.
107+
108+
.. step:: Type the name of the index you want to delete and click :guilabel:`Save`.
109+
79110
Learn More
80111
----------
81112

source/query/atlas-search.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.. _run-atlas-search-query:
2+
3+
========================
4+
Run Atlas Search Queries
5+
========================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
You can run Atlas Search :pipeline:`$search` and :pipeline:`$searchMeta`
16+
queries from |compass| if you :ref:`created the Atlas Search index
17+
<compass-create-search-index>` for data on the Atlas cluster. You can
18+
also run :pipeline:`$vectorSearch` queries from |compass| if you have an
19+
existing Atlas Vector search index on your data in Atlas.
20+
21+
Steps
22+
-----
23+
24+
.. procedure::
25+
:style: normal
26+
27+
.. step:: Find the index you want to use in your query
28+
29+
a. From the :guilabel:`Indexes` tab, click :guilabel:`Search Indexes`.
30+
#. Hover over the index you want to use in your query.
31+
32+
.. step:: Run the query
33+
34+
a. Click the :guilabel:`Aggregate` button.
35+
36+
|compass| switches to the :guilabel:`Aggregations` tab where you
37+
can run your query.
38+
39+
#. Construct your query.
40+
41+
By default, |compass| selects the :pipeline:`$search` stage for
42+
your query. You can select the :pipeline:`$searchMeta` stage
43+
to use in your query. If you are using a ``vectorSearch`` type
44+
index in your query, you can only use the
45+
:pipeline:`$vectorSearch` stage in your query.
46+
47+
.. note::
48+
49+
The Atlas Search :pipeline:`$search` and :pipeline:`$searchMeta` and
50+
the Atlas Vector Search :pipeline:`$vectorSearch` pipeline stages must
51+
be the first stage in your aggregation pipeline.
52+
53+
#. Click :guilabel:`Run` to run your query.
54+
55+
Learn More
56+
----------
57+
58+
- :atlas:`Atlas Search Pipeline Stages </atlas-search/query-syntax/>`
59+
60+
- :atlas:`Atlas Vector Search Pipeline Stage </atlas-vector-search/vector-search-stage/>`

source/query/filter.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,4 +452,5 @@ How Does the Compass Query Compare to MongoDB and SQL Queries?
452452
Limit Number of Returned Documents </query/limit>
453453
/query-plan
454454
/export-query-to-language
455+
/query/atlas-search
455456
/query/queries

0 commit comments

Comments
 (0)