From 9f657ce4b828b709da1940ad5ff13bda3865dc86 Mon Sep 17 00:00:00 2001 From: Frederico Ferreira Date: Wed, 13 Dec 2017 09:32:11 -0200 Subject: [PATCH] Fix list all Indexes for a Database 3.4 --- 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 8e6b9aa39aa..c59b9fa8fe2 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); });