diff --git a/source/reference/method.txt b/source/reference/method.txt index 752206d0bcd..a440f46f739 100644 --- a/source/reference/method.txt +++ b/source/reference/method.txt @@ -92,10 +92,6 @@ Collection - Removes all indexes on a collection. - * - :method:`db.collection.ensureIndex()` - - - Deprecated. Use :method:`db.collection.createIndex()`. - * - :method:`db.collection.explain()` - Returns information on the query execution of various methods. diff --git a/source/reference/method/db.collection.ensureIndex.txt b/source/reference/method/db.collection.ensureIndex.txt index 2808b84cd71..053939d1ed0 100644 --- a/source/reference/method/db.collection.ensureIndex.txt +++ b/source/reference/method/db.collection.ensureIndex.txt @@ -10,31 +10,11 @@ db.collection.ensureIndex() :depth: 1 :class: singlecol -Definition ----------- - -.. method:: db.collection.ensureIndex(keys, options) - - - .. include:: /includes/fact-mongo-shell-method.rst - - - .. deprecated:: 3.0 +.. admonition:: Removed in 5.0 :method:`db.collection.ensureIndex()` has been replaced by :method:`db.collection.createIndex()`. - Creates an index on the specified field if the index does not - already exist. - -Additional Information ----------------------- - -- Use :method:`db.collection.createIndex()` rather than - :method:`db.collection.ensureIndex()` to create new indexes. - -- The :doc:`/indexes` section of this manual for full - documentation of indexes and indexing in MongoDB. +.. seealso:: -- :method:`db.collection.getIndexes()` to view the specifications of - existing indexes for a collection. + :method:`db.collection.createIndex()` diff --git a/source/reference/method/js-collection.txt b/source/reference/method/js-collection.txt index 8d61797d901..0fc38c9e8aa 100644 --- a/source/reference/method/js-collection.txt +++ b/source/reference/method/js-collection.txt @@ -87,10 +87,6 @@ Collection Methods - Removes all indexes on a collection. - * - :method:`db.collection.ensureIndex()` - - - Deprecated. Use :method:`db.collection.createIndex()`. - * - :method:`db.collection.explain()` - Returns information on the query execution of various methods. @@ -229,7 +225,6 @@ Collection Methods /reference/method/db.collection.copyTo /reference/method/db.collection.count /reference/method/db.collection.countDocuments - /reference/method/db.collection.estimatedDocumentCount /reference/method/db.collection.createIndex /reference/method/db.collection.createIndexes /reference/method/db.collection.dataSize @@ -240,6 +235,7 @@ Collection Methods /reference/method/db.collection.dropIndex /reference/method/db.collection.dropIndexes /reference/method/db.collection.ensureIndex + /reference/method/db.collection.estimatedDocumentCount /reference/method/db.collection.explain /reference/method/db.collection.find /reference/method/db.collection.findAndModify diff --git a/source/release-notes/5.0-compatibility.txt b/source/release-notes/5.0-compatibility.txt index b04acf99788..c16cc5420a2 100644 --- a/source/release-notes/5.0-compatibility.txt +++ b/source/release-notes/5.0-compatibility.txt @@ -27,6 +27,8 @@ Starting in MongoDB 5.0, these commands are removed: - :dbcommand:`resetError` and :method:`db.resetError()`. Deprecated since MongoDB 1.6. +- :method:`db.collection.ensureIndex()` Deprecated since MongoDB 3.0. + Removed Parameters ------------------