From 601cb6858122b44b143510a07d1f64ce25b8874f Mon Sep 17 00:00:00 2001 From: cbullinger Date: Fri, 4 Oct 2024 11:12:14 -0400 Subject: [PATCH 1/2] Update Indexes page to clarify that vector search indexes require the plural create method --- source/fundamentals/indexes.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/source/fundamentals/indexes.txt b/source/fundamentals/indexes.txt index 633480db1..d55485894 100644 --- a/source/fundamentals/indexes.txt +++ b/source/fundamentals/indexes.txt @@ -225,7 +225,7 @@ embeddings stored in MongoDB Atlas. To learn more about Atlas Vector Search, see You can call the following methods on a collection to manage your Atlas Search and Vector Search indexes: -- ``createSearchIndex()`` +- ``createSearchIndex()`` *(valid for Search indexes only)* - ``createSearchIndexes()`` - ``listSearchIndexes()`` - ``updateSearchIndex()`` @@ -244,10 +244,10 @@ each of the preceding methods. Create a Search Index +++++++++++++++++++++ -You can use the `createSearchIndex() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#createSearchIndex(org.bson.conversions.Bson)>`__ -and the -`createSearchIndexes() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#createSearchIndexes(java.util.List)>`__ -methods to create Atlas Search and Vector Search indexes. +You can use the `createSearchIndex() +<{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#createSearchIndex(org.bson.conversions.Bson)>`__ +method to create an Atlas Search index. You *cannot* use this method to create a +Vector Search index at this time. The following code example shows how to create an Atlas Search index: @@ -257,7 +257,10 @@ The following code example shows how to create an Atlas Search index: :start-after: start create-search-index :end-before: end create-search-index -To create multiple Search or Vector Search indexes, you must create a +You can use the +`createSearchIndexes() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#createSearchIndexes(java.util.List)>`__ +method to create multiple Atlas Search indexes or one or more Vector Search +indexes. You must create and pass a `SearchIndexModel <{+api+}/apidocs/mongodb-driver-core/com/mongodb/client/model/SearchIndexModel.html>`__ instance for each index. @@ -606,4 +609,5 @@ For prior versions of MongoDB, pass "*" as a parameter to your call to For more information about the methods in this section, see the following API Documentation: - `dropIndex() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#dropIndex(java.lang.String)>`__ -- `dropIndexes() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#dropIndexes()>`__ \ No newline at end of file +- `dropIndexes() + <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#dropIndexes()>`__ From c7605bde12e86ac6ea1c80f0ca3b1d500eb02b92 Mon Sep 17 00:00:00 2001 From: cbullinger <115956901+cbullinger@users.noreply.github.com> Date: Fri, 4 Oct 2024 12:19:14 -0400 Subject: [PATCH 2/2] Update source/fundamentals/indexes.txt Co-authored-by: Jordan Smith <45415425+jordan-smith721@users.noreply.github.com> --- source/fundamentals/indexes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fundamentals/indexes.txt b/source/fundamentals/indexes.txt index d55485894..4d4808c9c 100644 --- a/source/fundamentals/indexes.txt +++ b/source/fundamentals/indexes.txt @@ -247,7 +247,7 @@ Create a Search Index You can use the `createSearchIndex() <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#createSearchIndex(org.bson.conversions.Bson)>`__ method to create an Atlas Search index. You *cannot* use this method to create a -Vector Search index at this time. +Vector Search index. The following code example shows how to create an Atlas Search index: