Skip to content

Commit 38b7289

Browse files
committed
addressing feedback
1 parent 6866297 commit 38b7289

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

source/includes/indexes/indexes.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@
9797
"fields": [
9898
{
9999
"type": "vector",
100-
"numDimensions": <numberOfDimensions>,
101-
"path": "<fieldToIndex>",
102-
"similarity": "euclidean | cosine | dotProduct"
100+
"numDimensions": <number of dimensions>,
101+
"path": "<field to index>",
102+
"similarity": <select from "euclidean", "cosine", "dotProduct">
103103
}
104104
]
105105
},
106-
name="<nameOfIndex>",
106+
name="<index name>",
107107
type="vectorSearch",
108108
)
109109

@@ -113,7 +113,7 @@
113113

114114
# start-create-search-indexes
115115

116-
index_one = SearchIndexModel(
116+
search_idx = SearchIndexModel(
117117
definition ={
118118
"mappings": {
119119
"dynamic": True
@@ -122,22 +122,22 @@
122122
name="my_index",
123123
)
124124

125-
index_two_vector = SearchIndexModel(
125+
vector_idx = SearchIndexModel(
126126
definition={
127127
"fields": [
128128
{
129129
"type": "vector",
130-
"numDimensions": <numberOfDimensions>,
131-
"path": "<fieldToIndex>",
132-
"similarity": "euclidean | cosine | dotProduct"
130+
"numDimensions": <number of dimensions>,
131+
"path": "<field to index>",
132+
"similarity": <select from "euclidean", "cosine", "dotProduct">
133133
}
134134
]
135135
},
136136
name="my_vector_index",
137137
type="vectorSearch",
138138
)
139139

140-
indexes = [index_one, index_two_vector]
140+
indexes = [search_idx, vector_idx]
141141

142142
collection.create_search_indexes(models=indexes)
143143
# end-create-search-indexes
@@ -165,7 +165,7 @@
165165
{
166166
"type": "vector",
167167
"numDimensions": 1536,
168-
"path": "<fieldToIndex>",
168+
"path": "<field to index>",
169169
"similarity": "euclidean"
170170
},
171171
]

source/indexes/atlas-search-index.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ date, objectId, numeric, string, or UUID values that you want to use to
3636
pre-filter your data.
3737

3838
You can call the following methods on a collection to manage your Atlas Search
39-
indexes:
39+
and vector Search indexes:
4040

4141
- ``create_search_index()``
4242
- ``create_search_indexes()``
@@ -72,18 +72,18 @@ The following code example shows how to create a single Atlas Search index:
7272
:end-before: end-create-search-index
7373

7474
The following code example shows how to create a single Atlas Vector Search index
75-
using the `SearchIndexModel <{+api-root+}pymongo/operations.html#pymongo.operations.SearchIndexModel>`__
75+
by using the `SearchIndexModel <{+api-root+}pymongo/operations.html#pymongo.operations.SearchIndexModel>`__
7676
object:
7777

7878
.. literalinclude:: /includes/indexes/indexes.py
7979
:language: python
8080
:start-after: start-create-vector-search-index
8181
:end-before: end-create-vector-search-index
8282

83-
You can use `create_search_indexes() <{+api-root+}pymongo/collection.html#pymongo.collection.Collection.create_search_indexes>`__
84-
to create multiple indexes. These indexes can be Atlas Search indexes or Atlas
85-
Vector Search indexes. ``create_search_indexes()`` requires the ``SearchIndexModel``
86-
object.
83+
You can use the `create_search_indexes() <{+api-root+}pymongo/collection.html#pymongo.collection.Collection.create_search_indexes>`__
84+
method to create multiple indexes. These indexes can be Atlas Search or
85+
Vector Search indexes. The ``create_search_indexes()`` method takes a list of
86+
``SearchIndexModel`` objects that correspond to each index you want to create.
8787

8888
The following code example shows how to create an Atlas Search index and an Atlas
8989
Vector Search index:
@@ -100,7 +100,7 @@ List Search Indexes
100100

101101
You can use the
102102
`list_search_indexes() <{+api-root+}pymongo/collection.html#pymongo.collection.Collection.list_search_indexes>`__
103-
method to return the Atlas Search indexes and Atlas Vector Search indexes
103+
method to get information about the Atlas Search and Vector Search indexes
104104
of a collection.
105105

106106
The following code example shows how to print a list of the search indexes of
@@ -119,7 +119,7 @@ Update a Search Index
119119

120120
You can use the
121121
`update_search_index() <{+api-root+}pymongo/collection.html#pymongo.collection.Collection.update_search_index>`__
122-
method to update an Atlas Search index or Atlas Vector Search index.
122+
method to update an Atlas Search or Vector Search index.
123123

124124
The following code example shows how to update an Atlas Search index:
125125

@@ -144,7 +144,7 @@ Delete a Search Index
144144

145145
You can use the
146146
`drop_search_index() <{+api-root+}pymongo/collection.html#pymongo.collection.Collection.drop_search_index>`__
147-
method to remove an Atlas Search index or Atlas Vector Search index.
147+
method to remove an Atlas Search or Vector Search index.
148148

149149
The following code shows how to delete a search index from a collection:
150150

0 commit comments

Comments
 (0)