Skip to content

Commit a34cd46

Browse files
cbullingerrustagir
andauthored
DOCSP-43565: Update Indexes page to clarify Vector Search Indexes use the plural create method (#176)
* Update Indexes page to clarify that vector search indexes require the plural create method * Apply suggestions from code review Co-authored-by: Rea Rustagi <[email protected]> --------- Co-authored-by: Rea Rustagi <[email protected]>
1 parent f9990c0 commit a34cd46

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

source/fundamentals/indexes.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ embeddings stored in MongoDB Atlas. To learn more about Atlas Vector Search, see
241241
You can call the following methods on a collection to manage your Atlas
242242
Search and Vector Search indexes:
243243

244-
- ``createSearchIndex()``
244+
- ``createSearchIndex()`` *(valid for Search indexes only)*
245245
- ``createSearchIndexes()``
246246
- ``listSearchIndexes()``
247247
- ``updateSearchIndex()``
@@ -261,9 +261,16 @@ Create a Search Index
261261
+++++++++++++++++++++
262262

263263
You can use the `createSearchIndex() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-index.html>`__
264-
and `createSearchIndexes() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-indexes.html>`__
265-
methods to create Atlas Search and Vector Search indexes on a
266-
collection.
264+
method to create a single Atlas Search index. You *cannot* use this method to
265+
create a Vector Search index.
266+
267+
You can use the
268+
`createSearchIndexes() <{+api+}/apidocs/mongodb-driver-kotlin-coroutine/mongodb-driver-kotlin-coroutine/com.mongodb.kotlin.client.coroutine/-mongo-collection/create-search-indexes.html>`__
269+
method to create multiple Atlas Search or Vector Search
270+
indexes. You must create a
271+
`SearchIndexModel
272+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/SearchIndexModel.html>`__
273+
instance for each index, then pass a list of ``SearchIndexModel`` instances to the ``createSearchIndexes()`` method.
267274

268275
The following code example shows how to create an Atlas Search index:
269276

0 commit comments

Comments
 (0)