Skip to content

Commit df292d3

Browse files
committed
RR feedback
1 parent e591b24 commit df292d3

File tree

1 file changed

+74
-71
lines changed

1 file changed

+74
-71
lines changed

source/indexes.txt

Lines changed: 74 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _kotlin-sync-indexes:
22

3-
=============================
4-
Optimize Queries with Indexes
5-
=============================
3+
=================================
4+
Optimize Queries by Using Indexes
5+
=================================
66

77
.. contents:: On this page
88
:local:
@@ -15,7 +15,7 @@ Optimize Queries with Indexes
1515
:values: reference
1616

1717
.. meta::
18-
:description: Learn how to use indexes with the MongoDB {+driver-short+} driver.
18+
:description: Learn how to use indexes by using the MongoDB Kotlin Sync driver.
1919
:keywords: query, optimization, efficiency, usage example, code example
2020

2121
.. TODO
@@ -28,8 +28,8 @@ Optimize Queries with Indexes
2828
Overview
2929
--------
3030

31-
On this page, you can see copyable code examples that show how to work with common
32-
types of indexes that you can use with the {+driver-short+}.
31+
On this page, you can see copyable code examples that show how to manage different
32+
types of indexes by using the {+driver-short+}.
3333

3434
.. TODO
3535
.. .. tip::
@@ -86,8 +86,7 @@ The following example creates a compound index on the specified fields:
8686
Multikey Index
8787
--------------
8888

89-
The following example creates a multikey index on the specified field that contains
90-
array values:
89+
The following example creates a multikey index on the specified array-valued field:
9190

9291
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
9392
:start-after: start-multikey
@@ -99,150 +98,154 @@ array values:
9998
.. TODO To learn more about multikey indexes, see the :ref:`kotlin-sync-multikey-index`
10099
.. guide.
101100

102-
Atlas Search Index
103-
------------------
104-
105-
.. TODO: To learn more about Atlas search indexes, see the :ref:`kotlin-sync-atlas-search-index`
106-
.. guide.
107-
108-
Create Search Index
109-
~~~~~~~~~~~~~~~~~~~
101+
Geospatial Index
102+
----------------
110103

111-
The following example creates an Atlas search index on the specified field:
104+
The following example creates a 2dsphere index on the specified field that contains
105+
GeoJSON objects:
112106

113107
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
114-
:start-after: start-search-create
115-
:end-before: end-search-create
108+
:start-after: start-geo
109+
:end-before: end-geo
116110
:language: kotlin
117111
:copyable:
118112
:dedent:
119113

120-
.. TODO: To learn more about creating serach indexes, see the :ref:`kotlin-sync-atlas-search-index-create`
114+
.. TODO: To learn more about geospatial indexes, see the :ref:`kotlin-sync-geospatial-index`
121115
.. guide.
122116

123-
List Search Indexes
124-
~~~~~~~~~~~~~~~~~~~
117+
Unique Index
118+
------------
125119

126-
The following example prints a list of Atlas search indexes in the specified collection:
120+
The following example creates a unique index on the specified field:
127121

128122
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
129-
:start-after: start-search-list
130-
:end-before: end-search-list
123+
:start-after: start-unique
124+
:end-before: end-unique
131125
:language: kotlin
132126
:copyable:
133127
:dedent:
134128

135-
.. TODO: To learn more about listing search indexes, see the :ref:`kotlin-sync-atlas-search-index-list`
129+
.. TODO: To learn more about unique indexes, see the :ref:`kotlin-sync-unique-index`
136130
.. guide.
137131

138-
Update Search Indexes
139-
~~~~~~~~~~~~~~~~~~~~~
132+
Wildcard Index
133+
--------------
140134

141-
The following example updates an existing Atlas search index:
135+
The following example creates a wildcard index in the specified collection:
142136

143137
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
144-
:start-after: start-search-update
145-
:end-before: end-search-update
138+
:start-after: start-wildcard
139+
:end-before: end-wildcard
146140
:language: kotlin
147141
:copyable:
148142
:dedent:
149143

150-
.. TODO: To learn more about updating search indexes, see the :ref:`kotlin-sync-atlas-search-index-update`
144+
.. TODO: To learn more about wildcard indexes, see the :ref:`kotlin-sync-wildcard-index`
151145
.. guide.
152146

153-
Delete Search Indexes
154-
~~~~~~~~~~~~~~~~~~~~~
147+
Clustered Index
148+
---------------
155149

156-
The following example deletes an Atlas search index with the specified name:
150+
The following example creates a new collection with a clustered index on the ``_id``
151+
field:
157152

158153
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
159-
:start-after: start-search-delete
160-
:end-before: end-search-delete
154+
:start-after: start-clustered
155+
:end-before: end-clustered
161156
:language: kotlin
162157
:copyable:
163158
:dedent:
164159

165-
.. TODO: To learn more about deleting search indexes, see the :ref:`kotlin-sync-atlas-search-index-drop`
160+
.. TODO: To learn more about wildcard indexes, see the :ref:`kotlin-sync-clustered-index`
166161
.. guide.
167162

168-
Text Index
169-
----------
163+
Atlas Search Index Management
164+
-----------------------------
165+
166+
The following sections contain code examples that describe how to manage Atlas Search
167+
indexes.
168+
169+
.. TODO: To learn more about Atlas search indexes, see the :ref:`kotlin-sync-atlas-search-index`
170+
.. guide.
171+
172+
Create Search Index
173+
~~~~~~~~~~~~~~~~~~~
170174

171-
The following example creates a text index on the specified field:
175+
The following example creates an Atlas search index on the specified field:
172176

173177
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
174-
:start-after: start-text
175-
:end-before: end-text
178+
:start-after: start-search-create
179+
:end-before: end-search-create
176180
:language: kotlin
177181
:copyable:
178182
:dedent:
179183

180-
.. TODO: To learn more about text indexes, see the :ref:`kotlin-sync-text-index`
184+
.. TODO: To learn more about creating serach indexes, see the :ref:`kotlin-sync-atlas-search-index-create`
181185
.. guide.
182186

183-
Geospatial Index
184-
----------------
187+
List Search Indexes
188+
~~~~~~~~~~~~~~~~~~~
185189

186-
The following example creates a 2dsphere index on the specified field that contains
187-
GeoJSON objects:
190+
The following example prints a list of Atlas search indexes in the specified collection:
188191

189192
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
190-
:start-after: start-geo
191-
:end-before: end-geo
193+
:start-after: start-search-list
194+
:end-before: end-search-list
192195
:language: kotlin
193196
:copyable:
194197
:dedent:
195198

196-
.. TODO: To learn more about geospatial indexes, see the :ref:`kotlin-sync-geospatial-index`
199+
.. TODO: To learn more about listing search indexes, see the :ref:`kotlin-sync-atlas-search-index-list`
197200
.. guide.
198201

199-
Unique Index
200-
------------
202+
Update Search Indexes
203+
~~~~~~~~~~~~~~~~~~~~~
201204

202-
The following example creates a unique index on the specified field:
205+
The following example updates an existing Atlas search index with the specified
206+
new index definition:
203207

204208
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
205-
:start-after: start-unique
206-
:end-before: end-unique
209+
:start-after: start-search-update
210+
:end-before: end-search-update
207211
:language: kotlin
208212
:copyable:
209213
:dedent:
210214

211-
.. TODO: To learn more about unique indexes, see the :ref:`kotlin-sync-unique-index`
215+
.. TODO: To learn more about updating search indexes, see the :ref:`kotlin-sync-atlas-search-index-update`
212216
.. guide.
213217

214-
Wildcard Index
215-
--------------
218+
Delete Search Indexes
219+
~~~~~~~~~~~~~~~~~~~~~
216220

217-
The following example creates a wildcard index in the specified collection:
221+
The following example deletes an Atlas search index with the specified name:
218222

219223
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
220-
:start-after: start-wildcard
221-
:end-before: end-wildcard
224+
:start-after: start-search-delete
225+
:end-before: end-search-delete
222226
:language: kotlin
223227
:copyable:
224228
:dedent:
225229

226-
.. TODO: To learn more about wildcard indexes, see the :ref:`kotlin-sync-wildcard-index`
230+
.. TODO: To learn more about deleting search indexes, see the :ref:`kotlin-sync-atlas-search-index-drop`
227231
.. guide.
228232

229-
Clustered Index
230-
---------------
233+
Text Index
234+
----------
231235

232-
The following example creates a new collection with a clustered index on the ``_id``
233-
field:
236+
The following example creates a text index on the specified string field:
234237

235238
.. literalinclude:: /includes/usage-examples/index-code-examples.kt
236-
:start-after: start-clustered
237-
:end-before: end-clustered
239+
:start-after: start-text
240+
:end-before: end-text
238241
:language: kotlin
239242
:copyable:
240243
:dedent:
241244

242-
.. TODO: To learn more about wildcard indexes, see the :ref:`kotlin-sync-clustered-index`
245+
.. TODO: To learn more about text indexes, see the :ref:`kotlin-sync-text-index`
243246
.. guide.
244247

245-
Remove an Index
248+
Delete an Index
246249
---------------
247250

248251
The following example deletes an index with the specified name:

0 commit comments

Comments
 (0)