From 56337c183fd399cc1b420d4daaf75b5c37e29576 Mon Sep 17 00:00:00 2001 From: Frederico Ferreira Date: Wed, 13 Dec 2017 09:31:22 -0200 Subject: [PATCH] Fix list all Indexes for a Database 3.2 --- source/tutorial/manage-indexes.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tutorial/manage-indexes.txt b/source/tutorial/manage-indexes.txt index 7394268f972..d64790e1cb4 100644 --- a/source/tutorial/manage-indexes.txt +++ b/source/tutorial/manage-indexes.txt @@ -45,7 +45,7 @@ can use the following operation in the :program:`mongo` shell: .. code-block:: javascript db.getCollectionNames().forEach(function(collection) { - indexes = db[collection].getIndexes(); + indexes = db.getCollection(collection).getIndexes(); print("Indexes for " + collection + ":"); printjson(indexes); });