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); });