Skip to content

Commit 4cdf882

Browse files
authored
Docsp 30756 4.5 through 4.0 backport (#706)
* cherry fix * cherry fix * cherry fix + errors * double text?
1 parent a420fdc commit 4cdf882

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

source/fundamentals/indexes.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
Indexes
55
=======
66

7-
.. default-domain:: mongodb
8-
97
.. contents:: On this page
108
:local:
119
:backlinks: none
@@ -150,6 +148,8 @@ explanation of multikey indexes, including a discussion of their behavior
150148
and limitations, refer to the :manual:`Multikey Indexes page
151149
</core/index-multikey>` in the MongoDB Server manual.
152150

151+
.. _node-fundamentals-text-indexes:
152+
153153
Text Indexes
154154
~~~~~~~~~~~~
155155

@@ -272,6 +272,19 @@ the following:
272272
Refer to the :manual:`Unique Indexes page </core/index-unique>` in the
273273
MongoDB server manual for more information.
274274

275+
List Indexes
276+
------------
277+
278+
You can use the ``listIndexes()`` method to list all of the indexes for
279+
a collection. The `listIndexes()
280+
<{+api+}/classes/Collection.html#listIndexes>`__ method takes an optional
281+
`ListIndexesOptions <{+api+}/interfaces/ListIndexesOptions.html>`__
282+
parameter. The ``listIndexes()`` method returns an object of type
283+
`ListIndexesCursor <{+api+}/classes/ListIndexesCursor.html>`__.
284+
285+
The following code uses the ``listIndexes()`` method to list all the
286+
indexes in a collection:
287+
275288
.. literalinclude:: /code-snippets/indexes/listIndexes.js
276289
:language: js
277290
:start-after: start-listIndexes-example

source/quick-start.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
Quick Start
55
===========
66

7-
.. default-domain:: mongodb
8-
97
.. contents:: On this page
108
:local:
119
:backlinks: none
@@ -27,6 +25,8 @@ required) MongoDB instance with this guide.
2725
Follow the steps below to connect a sample Node.js application to a MongoDB
2826
instance on MongoDB Atlas.
2927

28+
.. _node-quick-start-download-and-install:
29+
3030
Set up Your Project
3131
-------------------
3232

0 commit comments

Comments
 (0)