Skip to content

Commit 6f969b5

Browse files
committed
DOCSP-48608 Edit AVS and AS section on Indexes page (mongodb#1065)
* DOCSP-48606 Atlas Vector Search * edit existing sections * Edits * edit code comments * add link to as query guide * title change * more edits
1 parent f497617 commit 6f969b5

File tree

4 files changed

+50
-54
lines changed

4 files changed

+50
-54
lines changed

source/atlas-search.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.. _node-atlas-search:
22

3-
============
4-
Atlas Search
5-
============
3+
=========================
4+
Run an Atlas Search Query
5+
=========================
66

77
.. facet::
88
:name: genre

source/atlas-vector-search.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ Perform a Vector Search
4545

4646
To use this feature, you must create a vector search index and index your
4747
vector embeddings. To learn about how to programmatically create a
48-
vector search index, see the :atlas:`Create an Atlas Vector Search Index
49-
</atlas-vector-search/vector-search-type/#create-an-atlas-vector-search-index>` section in the
50-
Atlas documentation. To learn more about vector embeddings, see
48+
vector search index, see the :ref:`<node-indexes-search>` section in the
49+
Indexes guide. To learn more about vector embeddings, see
5150
:atlas:`How to Create Vector Embeddings
5251
</atlas-vector-search/create-embeddings/>` in the Atlas documentation.
5352

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 a 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 a 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: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. _node-fundamentals-indexes:
22
.. _node-indexes:
33

4-
=======
5-
Indexes
6-
=======
4+
======================
5+
Indexes on Collections
6+
======================
77

88
.. facet::
99
:name: genre
@@ -340,38 +340,38 @@ To learn more, see :manual:`Unique Indexes </core/index-unique>`.
340340

341341
.. _node-indexes-search:
342342

343-
Search Indexes
344-
--------------
343+
Atlas Search and Atlas Vector Search Indexes
344+
--------------------------------------------
345345

346-
Atlas Search is a feature that allows you to perform full-text
347-
searches. To learn more, see the :ref:`Atlas Search <fts-top-ref>`
348-
documentation.
346+
You can programmatically manage your Atlas Search and Atlas Vector
347+
Search indexes by using the {+driver-short+}.
349348

350-
Before you can perform a search on an Atlas collection, you must first
351-
create an Atlas Search index on the collection. An Atlas Search
352-
index is a data structure that categorizes data in a searchable format.
349+
The Atlas Search feature enables you to perform full-text searches on
350+
collections hosted on MongoDB Atlas. To learn more about Atlas
351+
Search, see the :atlas:`Atlas Search
352+
</atlas-search/atlas-search-overview/>` documentation.
353353

354-
You can use the following methods to manage your Search indexes:
354+
Atlas Vector Search enables you to perform semantic searches on vector
355+
embeddings stored in Atlas. To learn more about Atlas
356+
Vector Search, see the :atlas:`Atlas Vector Search
357+
</atlas-vector-search/vector-search-overview/>` documentation.
355358

356-
- ``createSearchIndex()``
357-
- ``createSearchIndexes()``
358-
- ``listSearchIndexes()``
359-
- ``updateSearchIndex()``
360-
- ``dropSearchIndex()``
359+
To learn more about how to run an Atlas Search or Atlas Vector Search query, see the
360+
:ref:`node-atlas-search` or :ref:`node-atlas-vector-search` guide.
361361

362-
The following sections provide code samples that use each of the preceding
363-
methods to manage Search indexes.
362+
The following sections contain code examples that demonstrate how to manage Atlas
363+
Search and Atlas Vector Search indexes.
364364

365365
Create a Search Index
366366
~~~~~~~~~~~~~~~~~~~~~
367367

368368
You can use the `createSearchIndex()
369369
<{+api+}/classes/Collection.html#createSearchIndex>`__ and
370370
`createSearchIndexes() <{+api+}/classes/Collection.html#createSearchIndexes>`__
371-
methods to create new Search indexes.
371+
methods to create new Atlas Search and Atlas Vector Search indexes.
372372

373373
The following code shows how to
374-
use the ``createSearchIndex()`` method to create an index called
374+
use the ``createSearchIndex()`` method to create an Atlas Search index called
375375
``search1``:
376376

377377
.. literalinclude:: /code-snippets/indexes/searchIndexes.js
@@ -380,15 +380,12 @@ use the ``createSearchIndex()`` method to create an index called
380380
:start-after: start createSearchIndex example
381381
:end-before: end createSearchIndex example
382382

383-
When connecting to {+mdb-server+} v6.0.11 and later v6 versions, or
384-
v7.0.2 and later v7 versions, you can use the driver to create an Atlas
385-
Vector Search index on a collection. Learn more about this feature in
386-
the :atlas:`Atlas Vector Search documentation
387-
</atlas-vector-search/vector-search-overview/>`.
383+
When connecting to {+mdb-server+} v6.0.11 and later, you can use the driver to
384+
create an Atlas Vector Search index by specifying ``vectorSearch`` in the ``type``
385+
field of the index definition.
388386

389387
The following code shows how to use the ``createSearchIndex()`` method
390-
to create a search index in which the ``type`` field is
391-
``vectorSearch``:
388+
to create an Atlas Vector Search index:
392389

393390
.. literalinclude:: /code-snippets/indexes/searchIndexes.js
394391
:language: javascript
@@ -401,13 +398,14 @@ List Search Indexes
401398

402399
You can use the `listSearchIndexes()
403400
<{+api+}/classes/Collection.html#listSearchIndexes>`__
404-
method to return a cursor that contains the Search indexes of a given
405-
collection. The ``listSearchIndexes()`` method takes an optional string
406-
parameter, ``name``, to return only the indexes with matching names. It
407-
also takes an optional `aggregateOptions <{+api+}/interfaces/AggregateOptions.html>`__ parameter.
401+
method to return a cursor that contains the Atlas Search and Atlas Vector Search
402+
indexes of a given collection. The ``listSearchIndexes()`` method takes an
403+
optional string parameter, ``name``, to return only the indexes with matching
404+
names. It also takes an optional
405+
`aggregateOptions <{+api+}/interfaces/AggregateOptions.html>`__ parameter.
408406

409407
The following code uses the ``listSearchIndexes()`` method to list the
410-
Search indexes in a collection:
408+
Atlas Search and Atlas Vector Search indexes in a collection:
411409

412410
.. literalinclude:: /code-snippets/indexes/searchIndexes.js
413411
:language: javascript
@@ -419,12 +417,12 @@ Update a Search Index
419417
~~~~~~~~~~~~~~~~~~~~~
420418

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

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

429427
.. literalinclude:: /code-snippets/indexes/searchIndexes.js
430428
:language: javascript
@@ -436,12 +434,11 @@ Drop a Search Index
436434
~~~~~~~~~~~~~~~~~~~
437435

438436
You can use the `dropSearchIndex()
439-
<{+api+}/classes/Collection.html#dropSearchIndex>`__ method to remove a Search
440-
index.
437+
<{+api+}/classes/Collection.html#dropSearchIndex>`__ method to remove an Atlas
438+
Search or Atlas Vector Search index.
441439

442-
The following code shows how to
443-
use the ``dropSearchIndex()`` method to remove an index called
444-
``search1``:
440+
The following code shows how to use the ``dropSearchIndex()`` method to remove
441+
an index called ``search1``:
445442

446443
.. literalinclude:: /code-snippets/indexes/searchIndexes.js
447444
:language: javascript

0 commit comments

Comments
 (0)