Skip to content

Commit 4d67413

Browse files
committed
last of copy review comments
1 parent a39d6d0 commit 4d67413

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

source/fundamentals/indexes.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,13 @@ Vector Search, see the :atlas:`Atlas Vector Search
264264
.. Add when Go AVS guide is ready:
265265
.. To learn more about Atlas Vector Search, see the :ref:`golang-atlas-vector-search` guide.
266266

267-
The following sections contain code examples that describe how to manage Atlas Search indexes.
267+
The following sections contain code examples that demonstrate how to manage Atlas
268+
Search indexes.
268269

269270
Create a Search Index
270271
`````````````````````
271272

272-
You can create an Atlas Search index or an Atlas Vector Search index by providing
273+
You can create an Atlas Vector Search index or an Atlas Search index by providing
273274
an index definition to the ``createOne()`` method.
274275

275276
The following example creates an Atlas Vector Search index on the ``plot_embedding``
@@ -304,10 +305,10 @@ The following example lists the details of the specified search index:
304305
Update Search Indexes
305306
`````````````````````
306307

307-
You can update an Atlas Search or Vector Search index by specifying the name of the index
308+
You can update an Atlas Search or Atlas Vector Search index by specifying the name of the index
308309
and the new index definition.
309310

310-
The following example updates a vector search index by providing the name of the index and
311+
The following example updates an Atlas Vector Search index by providing the name of the index and
311312
a new index definition:
312313

313314
.. literalinclude:: /includes/fundamentals/code-snippets/indexes/atlasVectorSearch.go
@@ -319,7 +320,7 @@ a new index definition:
319320
Delete Search Indexes
320321
`````````````````````
321322

322-
The following example deletes a search index with the specified name:
323+
The following example deletes an Atlas Search index with the specified name:
323324

324325
.. literalinclude:: /includes/fundamentals/code-snippets/indexes/atlasVectorSearch.go
325326
:language: go

source/includes/fundamentals/code-snippets/indexes/atlasVectorSearch.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func main() {
2121
clientOptions := options.Client().ApplyURI(uri)
2222
client, err := mongo.Connect(ctx, clientOptions)
2323
if err != nil {
24-
log.Fatalf("failed to connect to the server: %v", err)
24+
log.Fatalf("Failed to connect to the server: %v", err)
2525
}
2626
defer func() { _ = client.Disconnect(ctx) }()
2727

@@ -62,7 +62,7 @@ func main() {
6262
// Creates the index
6363
searchIndexName, err := coll.SearchIndexes().CreateOne(ctx, vectorSearchIndexModel)
6464
if err != nil {
65-
log.Fatalf("failed to create the vector search index: %v", err)
65+
log.Fatalf("Failed to create the vector search index: %v", err)
6666
}
6767
// end-create-vector-search
6868

@@ -90,7 +90,7 @@ func main() {
9090
// Creates the index
9191
searchIndexName, err := coll.SearchIndexes().CreateOne(ctx, searchIndexModel)
9292
if err != nil {
93-
log.Fatalf("failed to create the atlas search index: %v", err)
93+
log.Fatalf("Failed to create the atlas search index: %v", err)
9494
}
9595
// end-create-atlas-search
9696

@@ -105,11 +105,11 @@ func main() {
105105
// Prints the index details to the console as JSON
106106
var results []bson.M
107107
if err := cursor.All(ctx, &results); err != nil {
108-
log.Fatalf("failed to unmarshal results to bson: %v", err)
108+
log.Fatalf("Failed to unmarshal results to bson: %v", err)
109109
}
110110
res, err := json.Marshal(results)
111111
if err != nil {
112-
log.Fatalf("failed to marshal results to json: %v", err)
112+
log.Fatalf("Failed to marshal results to json: %v", err)
113113
}
114114
fmt.Println(res)
115115
// end-list-index
@@ -138,14 +138,14 @@ func main() {
138138
// Updates the specified index
139139
err := coll.SearchIndexes().UpdateOne(ctx, indexName, definition)
140140
if err != nil {
141-
log.Fatalf("failed to update the index: %v", err)
141+
log.Fatalf("Failed to update the index: %v", err)
142142
}
143143
// end-update-index
144144

145145
// start-delete-index
146146
err := coll.SearchIndexes().DropOne(ctx, "<indexName>")
147147
if err != nil {
148-
log.Fatalf("failed to delete the index: %v", err)
148+
log.Fatalf("Failed to delete the index: %v", err)
149149
}
150150
// end-delete-index
151151
}

0 commit comments

Comments
 (0)