Skip to content

Commit 2158176

Browse files
authored
(DOCSP-41097): Added Atlas Search and AVS tutorials. (#118)
* (DOCSP-41097): Added Atlas Seash and AVS tutorials. * (DOCSP-41097) Incorporated Jeff's feedback.
1 parent 214060d commit 2158176

File tree

3 files changed

+310
-0
lines changed

3 files changed

+310
-0
lines changed
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
.. _ak8so-atlas-search:
2+
3+
============================================
4+
Create an |fts| Index with |k8s|
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+
|ak8so| supports |fts| indexes on |service| clusters. To learn more see
16+
:ref:`ref-create-index`.
17+
18+
Prerequisites
19+
-------------
20+
21+
- Running |k8s| cluster with
22+
|ak8so| :ref:`deployed <ak8so-quick-start-ref>`.
23+
24+
- MongoDB version ``4.2`` or higher on any {+cluster+} tier.
25+
26+
.. note::
27+
28+
You can't create more than:
29+
30+
- 3 indexes on ``M0`` clusters.
31+
- 5 indexes on ``M2`` clusters.
32+
- 10 indexes on ``M5`` clusters.
33+
34+
There are no limits to the number of indexes you can create on
35+
``M10+`` clusters.
36+
37+
- Collection to create the |fts| index for.
38+
39+
Required Access
40+
---------------
41+
42+
You must have one of the following roles to create |fts| indexes:
43+
44+
- :authrole:`Project Search Index Editor`
45+
- :authrole:`Project Data Access Admin`
46+
47+
You must have at least the :atlasrole:`readWriteAnyDatabase` role or
48+
:ref:`readWrite <atlas-specific-privileges>` access to the database
49+
where you want to create the indexes. To learn more, see
50+
:ref:`atlas-user-privileges` or :ref:`atlas-specific-privileges`.
51+
52+
Procedure
53+
---------
54+
55+
.. procedure::
56+
:style: normal
57+
58+
.. step:: Configure an :ref:`atlassearchindexconfig-custom-resource`.
59+
60+
The following example shows an ``AtlasSearchIndexConfig`` custom
61+
resource specification configured for the ``lucene.standard``
62+
analyzer method.
63+
64+
.. note::
65+
66+
Multiple ``atlasDeployment`` custom resources can reference
67+
the same ``atlasSearchIndexConfiguration`` custom resource.
68+
69+
**Example:**
70+
71+
Run the following command:
72+
73+
.. code-block::
74+
75+
cat <<EOF | kubectl apply -f -
76+
apiVersion: atlas.mongodb.com/v1
77+
kind: AtlasSearchIndexConfig
78+
metadata:
79+
name: atlassearchindexconfig-sample
80+
namespace: mongodb-atlas-system
81+
spec:
82+
analyzer: lucene.standard
83+
searchAnalyzer: lucene.standard
84+
EOF
85+
86+
To learn more about the available parameters, see
87+
:ref:`atlassearchindexconfig-custom-resource`.
88+
89+
.. step:: Configure the :ref:`atlasdeployment-custom-resource`.
90+
91+
Configure the :setting:`spec.deploymentSpec.searchIndexes`
92+
object.
93+
94+
The following parameters apply to this object:
95+
96+
.. list-table::
97+
:widths: 25 75
98+
:header-rows: 1
99+
100+
* - Parameter
101+
- Description
102+
103+
* - ``DBName``
104+
- Human-readable label that identifies the existing
105+
database that contains the collection with one or more
106+
|fts| indexes.
107+
108+
.. important::
109+
110+
The database that you specify must already exist. If
111+
you don't have an existing database,
112+
:atlas:`create one </create-connect-deployments/>`.
113+
114+
* - ``CollectionName``
115+
- Human-readable label that identifies the collection that
116+
contains one or more |fts| indexes.
117+
118+
* - ``Type``
119+
- Type of the index. |service| accepts the following values:
120+
121+
- ``search``
122+
- ``vectorSearch``
123+
124+
* - ``search.searchIndexConfigurationRef.name``
125+
- Name that references the
126+
:ref:`atlassearchindexconfig-custom-resource`.
127+
128+
* - ``search.searchIndexConfigurationRef.namespace``
129+
- Namespace that contains the
130+
:ref:`atlassearchindexconfig-custom-resource`.
131+
132+
To learn more about the available parameters, see
133+
:ref:`atlasdeployment-custom-resource`.
134+
135+
**Example:**
136+
137+
Run the following command.
138+
139+
.. code-block:: sh
140+
:emphasize-lines: 24-34
141+
142+
cat <<EOF | kubectl apply -f -
143+
apiVersion: atlas.mongodb.com/v1
144+
kind: AtlasDeployment
145+
metadata:
146+
name: my-atlas-cluster
147+
namespace: mongodb-atlas-system
148+
spec:
149+
projectRef:
150+
name: my-project
151+
deploymentSpec:
152+
backupEnabled: true
153+
clusterType: REPLICASET
154+
name: Test-cluster-M10
155+
replicationSpecs:
156+
- regionConfigs:
157+
- backingProviderName: AWS
158+
electableSpecs:
159+
instanceSize: M10
160+
nodeCount: 3
161+
priority: 7
162+
providerName: AWS
163+
regionName: US_EAST_1
164+
zoneName: Zone 1
165+
searchIndexes:
166+
- DBName: sample_airbnb
167+
collectionName: listingsAndReviews
168+
name: my-index
169+
search:
170+
mappings:
171+
dynamic: true
172+
searchConfigurationRef:
173+
name: atlassearchindexconfig-sample
174+
namespace: mongodb-atlas-system
175+
type: search
176+
terminationProtectionEnabled: false
177+
EOF
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
.. _ak8so-vector-search:
2+
3+
===================================================
4+
Create an {+avs+} Index with |k8s|
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+
|ak8so| supports {+avs+} indexes on |service| clusters. To learn more,
16+
see :ref:`avs-types-vector-search`.
17+
18+
Prerequisites
19+
-------------
20+
21+
- Running |k8s| cluster with
22+
|ak8so| :ref:`deployed <ak8so-quick-start-ref>`.
23+
24+
- MongoDB version ``6.0.11``, ``7.0.2``, or higher on any {+cluster+}
25+
tier.
26+
27+
.. note::
28+
29+
You can't create more than:
30+
31+
- 3 indexes on ``M0`` clusters.
32+
- 5 indexes on ``M2`` clusters.
33+
- 10 indexes on ``M5`` clusters.
34+
35+
There are no limits to the number of indexes you can create on
36+
``M10+`` clusters.
37+
38+
- Collection to create the {+avs+} index for.
39+
40+
Required Access
41+
---------------
42+
43+
You need the :authrole:`Project Data Access Admin` or higher role to
44+
create and manage {+avs+} indexes.
45+
46+
Procedure
47+
---------
48+
49+
.. procedure::
50+
:style: normal
51+
52+
.. step:: Configure the :ref:`atlasdeployment-custom-resource`.
53+
54+
Configure the :setting:`spec.deploymentSpec.searchIndexes`
55+
object.
56+
57+
The following parameters apply to this object:
58+
59+
.. list-table::
60+
:widths: 25 75
61+
:header-rows: 1
62+
63+
* - Parameter
64+
- Description
65+
66+
* - ``DBName``
67+
- Human-readable label that identifies the existing
68+
database that contains the collection with one or more
69+
|fts| indexes.
70+
71+
.. important::
72+
73+
The database that you specify must already exist. If
74+
you don't have an existing database,
75+
:atlas:`create one </create-connect-deployments/>`.
76+
77+
* - ``CollectionName``
78+
- Human-readable label that identifies the collection that
79+
contains one or more |fts| indexes.
80+
81+
* - ``Type``
82+
- Type of the index. |service| accepts the following values:
83+
84+
- ``search``
85+
- ``vectorSearch``
86+
87+
To learn more about the available parameters, see
88+
:ref:`atlasdeployment-custom-resource`.
89+
90+
**Example:**
91+
92+
Run the following command.
93+
94+
.. code-block:: sh
95+
:emphasize-lines: 24-33
96+
97+
cat <<EOF | kubectl apply -f -
98+
apiVersion: atlas.mongodb.com/v1
99+
kind: AtlasDeployment
100+
metadata:
101+
name: my-atlas-cluster
102+
namespace: mongodb-atlas-system
103+
spec:
104+
projectRef:
105+
name: my-project
106+
deploymentSpec:
107+
backupEnabled: true
108+
clusterType: REPLICASET
109+
name: Test-cluster-M10
110+
replicationSpecs:
111+
- regionConfigs:
112+
- backingProviderName: AWS
113+
electableSpecs:
114+
instanceSize: M10
115+
nodeCount: 3
116+
priority: 7
117+
providerName: AWS
118+
regionName: US_EAST_1
119+
zoneName: Zone 1
120+
searchIndexes:
121+
- DBName: sample_airbnb
122+
collectionName: listingsAndReviews
123+
name: my-index
124+
vectorSearch:
125+
fields: |
126+
[
127+
{"my-field":{"type": "vector", { ...},
128+
]
129+
type: vectorSearch
130+
terminationProtectionEnabled: false
131+
EOF

source/index.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ Get Hands-On Experience with |ak8so|
202202
Atlas Access </configure-ak8so-access-to-atlas>
203203
Import Projects </ak8so-import-projects>
204204
Data Federation </ak8so-set-up-data-federation>
205+
Atlas Search </ak8so-create-atlas-search-index>
206+
Atlas Vector Search </ak8so-create-vector-search-index>
205207
Atlas Stream Processing </ak8so-stream-processing>
206208
Atlas Cluster Backup </ak8so-back-up-deployment>
207209
Monitor Deployments </ak8so-monitoring>

0 commit comments

Comments
 (0)