Skip to content

Commit ade38be

Browse files
committed
more edits
1 parent 15c9b4b commit ade38be

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

source/code-snippets/indexes/searchIndexes.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function run() {
1717
const collection = database.collection("<collectionName>");
1818

1919
// start createSearchIndex example
20-
// Create an Atlas Search index
20+
// Creates an Atlas Search index
2121
const index1 = {
2222
name: "search1",
2323
definition: {
@@ -30,7 +30,7 @@ async function run() {
3030
// end createSearchIndex example
3131

3232
// start vectorSearchIdx example
33-
// Create an Atlas Vector Search index
33+
// Creates an Atlas Vector Search index
3434
const vectorSearchIdx = {
3535
name: "vsidx1",
3636
type: "vectorSearch",
@@ -48,7 +48,7 @@ async function run() {
4848
// end vectorSearchIdx example
4949

5050
// start listSearchIndexes example
51-
// List search indexes
51+
// Lists search indexes
5252
const result = await collection.listSearchIndexes().toArray();
5353
console.log("Existing search indexes:\n");
5454
for (const doc in result) {
@@ -57,7 +57,7 @@ async function run() {
5757
// end listSearchIndexes example
5858

5959
// start updateSearchIndex example
60-
// Update a search index
60+
// Updates a search index
6161
const index2 = {
6262
"mappings": {
6363
"dynamic": true,
@@ -72,7 +72,7 @@ async function run() {
7272
// end updateSearchIndex example
7373

7474
// start dropSearchIndex example
75-
// Dropping (deleting) a search index
75+
// Drops (deletes) a search index
7676
await collection.dropSearchIndex("search1");
7777
// end dropSearchIndex example
7878
} finally {

source/indexes.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,11 +417,11 @@ Update a Search Index
417417

418418
You can use the `updateSearchIndex()
419419
<{+api+}/classes/Collection.html#updateSearchIndex>`__ method to update an
420-
Atlas Search or Atlas Vector Search index.
420+
Atlas Search or Atlas Vector Search index by providing a new index definition.
421421

422422
The following code shows how to use the ``updateSearchIndex()`` method to
423-
update an Atlas Search index called ``search1`` to specify a string type
424-
for the ``description`` field:
423+
update an Atlas Search index called ``search1`` to change the type of the
424+
``description`` field to a string:
425425

426426
.. literalinclude:: /code-snippets/indexes/searchIndexes.js
427427
:language: javascript

0 commit comments

Comments
 (0)