Skip to content

Commit 5be5d74

Browse files
(DOCSP-29554): Ability to manage Atlas Search Indexes (#560)
* Initial commit for build * WIP * remove periods from step title * first draft * update snooty.toml * add link * typo * update ref * typo * fix regular index procedure * heading * minimalism * remove period from step title * review comments * minimalism * edit requirements * add results * minimalism * address review comments
1 parent 127c585 commit 5be5d74

File tree

4 files changed

+125
-32
lines changed

4 files changed

+125
-32
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ toc_landing_pages = [
1616
"/connect/advanced-connection-options",
1717
"/connect/favorite-connections",
1818
"/connect/favorite-connections/import-export",
19+
"/indexes",
1920
"/instance",
2021
"/config-file",
2122
"/query/filter",

source/includes/steps-create-index.yaml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
title: Click the :guilabel:`Create Index` button.
1+
title: Open the index creation dialog
22
level: 4
33
ref: create-collection
44
stepnum: 1
55
content: |
6-
From the :ref:`Indexes <collection-tab>` tab, click the
7-
:guilabel:`Create Index` button to bring up the
8-
:guilabel:`Create Index` dialog.
6+
From the :ref:`Indexes <indexes-tab>` tab, click the :guilabel:`Create
7+
Index` button.
98
---
10-
title: Optional. Enter the index name.
11-
level: 4
12-
ref: enter-index-name
13-
stepnum: 2
14-
content: |
15-
In the dialog, enter the name of the index to create, or leave blank
16-
to have MongoDB create a default name for the index.
17-
---
18-
title: Add fields to index.
9+
title: Add fields to the index
1910
level: 4
2011
ref: index-fields
2112
stepnum: 3
@@ -26,23 +17,30 @@ content: |
2617
- To specify an existing document field as an index key, select
2718
the field from the dropdown list.
2819
29-
- To specify a field which does not exist in any document as an
20+
- To specify a field that does not exist in any document as an
3021
index key, enter the field name in the input box.
3122
3223
- To create a :manual:`compound index </core/index-compound/>`,
33-
click :guilabel:`Add Another Field`.
24+
click the :icon-fa5:`plus` icon next to the index type dropdown.
3425
3526
b. Use the dropdown to the right of each field name to specify the
36-
index type (``ascending``, ``descending``, or
37-
:manual:`2dsphere </core/2dsphere/>`).
27+
index type. You can specify one of the following types:
28+
29+
- Ascending
30+
31+
- Descending
32+
33+
- 2dsphere
34+
35+
- Text
3836
3937
.. seealso::
4038
4139
To learn how to specify a wildcard index, see
4240
:ref:`compass-wildcard-index`.
4341
4442
---
45-
title: Optional. Specify the index options.
43+
title: Optional. Specify index options
4644
level: 4
4745
ref: index-options
4846
stepnum: 4
@@ -58,19 +56,18 @@ content: |
5856
- Description
5957
- More Information
6058
61-
* - Build index in the background
62-
63-
- Ensure that the MongoDB deployment remains available during
64-
the index build operation.
65-
66-
- :manual:`Background Construction </core/index-creation/index.html#background-construction>`
67-
6859
* - Create unique index
6960
7061
- Ensure that the indexed fields do not store duplicate values.
7162
7263
- :manual:`Unique Indexes </core/index-unique>`
7364
65+
* - Index name
66+
67+
- Specify a name for the index.
68+
69+
- :ref:`specify-index-name`
70+
7471
* - Create a :abbr:`TTL (Time to Live)` index
7572
7673
- Delete documents automatically after a specified number of

source/indexes.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Manage Indexes
1313
:class: singlecol
1414

1515
Indexes are special data structures that improve query performance.
16-
Indexes store a portion of a collection's data in an easy-to-traverse
17-
form. The index stores the value of a specific field or set of fields,
16+
Indexes store a portion of a collection's data in an easy-to-traverse
17+
form. The index stores the value of a specific field or set of fields,
1818
ordered by the value of the field.
1919

2020
To improve query performance, build indexes on fields that appear often
@@ -78,15 +78,17 @@ For each index, Compass displays the following information:
7878
Create an Index
7979
---------------
8080

81-
To create an index on a collection via Compass, the collection must
82-
contain documents.
83-
8481
.. include:: /includes/steps/create-index.rst
8582

83+
Create an Atlas Search Index
84+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85+
86+
To create an Atlas Search index, see :ref:`compass-create-search-index`.
87+
8688
.. _compass-wildcard-index:
8789

88-
Wildcard Indexes
89-
~~~~~~~~~~~~~~~~
90+
Create a Wildcard Index
91+
~~~~~~~~~~~~~~~~~~~~~~~
9092

9193
.. versionadded:: v4.2
9294

@@ -161,3 +163,8 @@ Limitations
161163

162164
- The :guilabel:`Indexes` tab is not available if you are connected
163165
to a :atlas:`Data Lake </data-lake>`.
166+
167+
.. toctree::
168+
:titlesonly:
169+
170+
/indexes/create-search-index
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
.. _compass-create-search-index:
2+
3+
============================
4+
Create an Atlas Search Index
5+
============================
6+
7+
.. contents:: On this page
8+
:local:
9+
:backlinks: none
10+
:depth: 1
11+
:class: singlecol
12+
13+
.. versionadded:: 1.40.0
14+
15+
You can create Atlas Search indexes in |compass|. Atlas Search indexes
16+
let you query data in `Atlas Search
17+
<https://www.mongodb.com/docs/atlas/atlas-search/>`__. Atlas Search
18+
indexes enable performant text search queries by mapping search terms to
19+
the documents that contain those terms.
20+
21+
About this Task
22+
---------------
23+
24+
To create an Atlas Search index, your deployment must be either:
25+
26+
- Hosted on `MongoDB Atlas <https://www.mongodb.com/docs/atlas/>`__ and
27+
have an Atlas cluster tier of M10 or higher.
28+
29+
- A local deployment that is set up using the `Atlas CLI
30+
<https://www.mongodb.com/docs/atlas/cli/stable/atlas-cli-deploy-local/>`__.
31+
32+
Additionally, your deployment must run MongoDB version 7.0 or later.
33+
34+
Steps
35+
-----
36+
37+
.. procedure::
38+
:style: normal
39+
40+
.. step:: Open the index creation dialog
41+
42+
From the :ref:`Indexes <indexes-tab>` tab, click the
43+
:guilabel:`Create` button, then click :guilabel:`Search Index`.
44+
45+
.. step:: Specify a name for the index
46+
47+
.. step:: Specify the search index definition
48+
49+
|compass-short| provides templates for different kinds of search
50+
indexes. To learn more, see
51+
:ref:`search-index-definition-create-mongosh`.
52+
53+
.. step:: Click :guilabel:`Create Search Index`
54+
55+
Example
56+
-------
57+
58+
The following example definition creates a search index that indexes all
59+
fields:
60+
61+
.. code-block:: javascript
62+
63+
{
64+
mappings: { dynamic: true }
65+
}
66+
67+
Results
68+
-------
69+
70+
To view the status of your created index, go to the :guilabel:`Indexes`
71+
tab and set the toggle at the top-right to :guilabel:`Search Indexes`.
72+
73+
The :guilabel:`Status` column indicates the status of the index. When
74+
the status is :guilabel:`Ready`, your index is ready to be used.
75+
76+
For more information on search index statuses, see
77+
:ref:`search-index-status`.
78+
79+
Learn More
80+
----------
81+
82+
- :ref:`compass-indexes`
83+
84+
- `Define Atlas Search Field Mappings
85+
<https://www.mongodb.com/docs/atlas/atlas-search/define-field-mappings/>`__
86+
87+
- `Define Synonym Mappings in Your Atlas Search Index
88+
<https://www.mongodb.com/docs/atlas/atlas-search/synonyms/>`__

0 commit comments

Comments
 (0)