Skip to content

Commit fff473d

Browse files
committed
Edits
1 parent 902afa0 commit fff473d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

source/includes/indexes/single-field.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'mongo'
22

33
# Replace the placeholders with your credentials
4-
uri = "mongodb+srv://lindsey:me123@atlascluster.spm1ztf.mongodb.net/?retryWrites=true&w=majority&appName=AtlasCluster"
4+
uri = "<connection string>"
55

66
# Set the server_api field of the options object to Stable API version 1
77
options = { server_api: { version: "1" }}
@@ -35,4 +35,4 @@
3535
all_indexes.each do |index_spec|
3636
puts index_spec.to_json
3737
end
38-
# end-check-single-index
38+
# end-check-single-index

source/indexes/single-field-index.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ load the sample datasets, see the :atlas:`Get Started with Atlas
5151
Create a Single Field Index
5252
---------------------------
5353

54-
Use the ``createIndex()`` method to create a single
54+
Use the ``create_one`` method to create a single
5555
field index. The following example creates an index in ascending order on the
5656
``title`` field:
5757

@@ -64,8 +64,9 @@ field index. The following example creates an index in ascending order on the
6464
Verify the Index's Creation
6565
---------------------------
6666

67-
You can verify that the index was created by using the ``listIndexes()`` method.
68-
You should see an index for ``title`` in the list, as shown in the following output:
67+
You can verify that the index was created by iterating through the ``indexes`` object
68+
to list the indexes in the collection. You should see an index for ``title`` in
69+
the list, as shown in the following output:
6970

7071
.. io-code-block::
7172
:copyable: true

0 commit comments

Comments
 (0)