Skip to content

Commit 3e81f2c

Browse files
authored
DOCSP-45930 Atlas Search Query Prep (#705)
* DOCSP-45930 Atlas Search Query Prep * * * * * * * separate aggregation step * SO feedback * * * * * BB edits * nit
1 parent 0fea6eb commit 3e81f2c

File tree

8 files changed

+43
-33
lines changed

8 files changed

+43
-33
lines changed

source/documents/modify-multiple.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ About this Task
3030

3131
- Previews of the documents affected by bulk update operations are
3232
only visible if your database is configured to support transactions.
33-
For details, see :ref:`transactions`.
33+
For details, see :manual:`</core/transactions>`.
3434

3535
.. BEGIN-COMPASS-ONLY
3636

source/export-query-to-language.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ Procedure
6363
:figwidth: 600px
6464
:alt: Copy button clicked in Export Query to Language modal
6565

66+
.. BEGIN-COMPASS-ONLY
67+
6668
Learn More
6769
----------
6870

6971
- :ref:`compass-export-agg-builder-results`
72+
73+
.. END-COMPASS-ONLY
19.1 KB
Loading
14.9 KB
Loading
14.9 KB
Loading

source/indexes.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ Create an Index
8181

8282
.. include:: /includes/shared/steps/create-index.rst
8383

84-
.. BEGIN-COMPASS-ONLY
85-
8684
Create an Atlas Search Index
8785
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8886

@@ -97,8 +95,6 @@ Atlas Vector Search indexes enable you to index vector data *and* other data
9795
types, which facilitates semantic searches on the indexed fields. For more
9896
information, see :ref:`compass-create-vector-search`.
9997

100-
.. END-COMPASS-ONLY
101-
10298
.. _compass-wildcard-index:
10399

104100
Create a Wildcard Index

source/query/atlas-search.txt

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,25 @@ Run Atlas Search Queries
1212
:depth: 1
1313
:class: singlecol
1414

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.
15+
Atlas Search queries are run as an :ref:`aggregation pipeline stage
16+
<compass-agg-builder>`. If you have an existing Atlas Search Index for data on
17+
your Atlas cluster, you can run :pipeline:`$search` and :pipeline:`$searchMeta`
18+
queries. If you have an existing Atlas Vector search index on your data in
19+
Atlas, you can also run :pipeline:`$vectorSearch` queries.
20+
21+
Before You Begin
22+
----------------
23+
24+
Create an :ref:`Atlas Search index <compass-create-search-index>` or an
25+
:ref:`Atlas Vector Search index <compass-create-vector-search>`.
26+
27+
.. note::
28+
29+
Atlas Search index management in the |compass-short| UI is available only
30+
for:
31+
32+
- Atlas local deployments.
33+
- Deployments running MongoDB 7.0 or later.
2034

2135
Steps
2236
-----
@@ -25,32 +39,28 @@ Steps
2539
:style: normal
2640

2741
.. 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.
3142

32-
.. step:: Run the query
43+
From the :guilabel:`Indexes` tab, click :guilabel:`Search Indexes`.
44+
Hover over the search index you want to use in your query.
3345

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.
46+
.. step:: Open the aggregation pipeline builder
47+
48+
Click the :guilabel:`Aggregate` button that appears when you hover over
49+
your search index.
4050

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.
51+
.. step:: Construct your query
52+
53+
By default, |compass| selects the :pipeline:`$search` stage for your
54+
query. You can also select the :pipeline:`$searchMeta` stage to use in
55+
your query. If you are using a ``vectorSearch`` type index in your query,
56+
you can use the :pipeline:`$vectorSearch` stage.
4657

47-
.. note::
58+
.. note::
4859

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.
60+
If you use the ``$search``, ``$searchMeta``, or ``$vectorSearch``
61+
stage, it must be the first stage in your aggregation pipeline.
5262

53-
#. Click :guilabel:`Run` to run your query.
63+
.. step:: Run your query
5464

5565
Learn More
5666
----------

source/schema.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ For fields that contain multiple data types,
109109
|compass-short| displays a percentage breakdown of
110110
the various data types across documents. In the example below,
111111
the chart shows the contents of a field called ``phone_no`` in which
112-
81% of documents are of type ``string``, and the remaining 19% are of
113-
type ``number``.
112+
20% of documents are of type ``int32``, and the remaining 80% are of
113+
type ``string``.
114114

115115
.. figure:: /images/compass/field-percentage-breakdown.png
116116
:figwidth: 330px
@@ -239,7 +239,7 @@ field shows the values that are strings:
239239
:figwidth: 574px
240240
:alt: Example of a field with mixed types
241241

242-
Clicking on the ``number`` type causes the chart to show its numeric
242+
Clicking on the ``int32`` type causes the chart to show its numeric
243243
data:
244244

245245
.. figure:: /images/compass/mixed-sample2.png

0 commit comments

Comments
 (0)