Skip to content

Docsp 30756 4.5 through 4.0 backport #706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions source/fundamentals/indexes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Indexes
=======

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
Expand Down Expand Up @@ -150,6 +148,8 @@ explanation of multikey indexes, including a discussion of their behavior
and limitations, refer to the :manual:`Multikey Indexes page
</core/index-multikey>` in the MongoDB Server manual.

.. _node-fundamentals-text-indexes:

Text Indexes
~~~~~~~~~~~~

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

List Indexes
------------

You can use the ``listIndexes()`` method to list all of the indexes for
a collection. The `listIndexes()
<{+api+}/classes/Collection.html#listIndexes>`__ method takes an optional
`ListIndexesOptions <{+api+}/interfaces/ListIndexesOptions.html>`__
parameter. The ``listIndexes()`` method returns an object of type
`ListIndexesCursor <{+api+}/classes/ListIndexesCursor.html>`__.

The following code uses the ``listIndexes()`` method to list all the
indexes in a collection:

.. literalinclude:: /code-snippets/indexes/listIndexes.js
:language: js
:start-after: start-listIndexes-example
Expand Down
4 changes: 2 additions & 2 deletions source/quick-start.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
Quick Start
===========

.. default-domain:: mongodb

.. contents:: On this page
:local:
:backlinks: none
Expand All @@ -27,6 +25,8 @@ required) MongoDB instance with this guide.
Follow the steps below to connect a sample Node.js application to a MongoDB
instance on MongoDB Atlas.

.. _node-quick-start-download-and-install:

Set up Your Project
-------------------

Expand Down