diff --git a/source/reference/method.txt b/source/reference/method.txt index 752206d0bcd..5861062fa67 100644 --- a/source/reference/method.txt +++ b/source/reference/method.txt @@ -50,11 +50,6 @@ Collection - Wraps the :pipeline:`$group` aggregation stage with a :group:`$sum` expression to return a count of the number of documents in a collection or a view. - - - * - :method:`db.collection.estimatedDocumentCount()` - - - Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view. * - :method:`db.collection.createIndex()` @@ -94,7 +89,11 @@ Collection * - :method:`db.collection.ensureIndex()` - - Deprecated. Use :method:`db.collection.createIndex()`. + - Removed. Use :method:`db.collection.createIndex()`. + + * - :method:`db.collection.estimatedDocumentCount()` + + - Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view. * - :method:`db.collection.explain()` diff --git a/source/reference/method/db.collection.ensureIndex.txt b/source/reference/method/db.collection.ensureIndex.txt index 2808b84cd71..67502a078c4 100644 --- a/source/reference/method/db.collection.ensureIndex.txt +++ b/source/reference/method/db.collection.ensureIndex.txt @@ -4,37 +4,14 @@ db.collection.ensureIndex() .. default-domain:: mongodb -.. contents:: On this page - :local: - :backlinks: none - :depth: 1 - :class: singlecol +.. method:: db.collection.ensureIndex() -Definition ----------- +.. admonition:: Removed in 5.0 + :class: note -.. method:: db.collection.ensureIndex(keys, options) + :method:`db.collection.ensureIndex()` has been replaced by + :method:`db.collection.createIndex()`. +.. seealso:: - .. include:: /includes/fact-mongo-shell-method.rst - - - .. deprecated:: 3.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. - -- :method:`db.collection.getIndexes()` to view the specifications of - existing indexes for a collection. + :method:`db.collection.createIndex()` \ No newline at end of file diff --git a/source/reference/method/js-collection.txt b/source/reference/method/js-collection.txt index 8d61797d901..a60b76ec85d 100644 --- a/source/reference/method/js-collection.txt +++ b/source/reference/method/js-collection.txt @@ -46,11 +46,6 @@ Collection Methods expression to return a count of the number of documents in a collection or a view. - - * - :method:`db.collection.estimatedDocumentCount()` - - - Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view. - * - :method:`db.collection.createIndex()` - Builds an index on a collection. @@ -89,7 +84,11 @@ Collection Methods * - :method:`db.collection.ensureIndex()` - - Deprecated. Use :method:`db.collection.createIndex()`. + - Removed. Use :method:`db.collection.createIndex()`. + + * - :method:`db.collection.estimatedDocumentCount()` + + - Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view. * - :method:`db.collection.explain()` @@ -229,7 +228,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 +238,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..5bff57ae58b 100644 --- a/source/release-notes/5.0-compatibility.txt +++ b/source/release-notes/5.0-compatibility.txt @@ -17,15 +17,29 @@ versions of MongoDB. Removed Commands ---------------- -Starting in MongoDB 5.0, these commands are removed: +Starting in MongoDB 5.0, these these database commands and +:binary:`~bin.mongo` shell helper methods are removed: -- :dbcommand:`shardConnPoolStats` (use :dbcommand:`connPoolStats` - instead). Deprecated since MongoDB 4.4. +.. list-table:: + :header-rows: 1 -- :dbcommand:`unsetSharding`. Deprecated since MongoDB 4.4. + * - Removed Command + - Alternative -- :dbcommand:`resetError` and :method:`db.resetError()`. Deprecated - since MongoDB 1.6. + * - :method:`db.collection.ensureIndex()` + - :method:`db.collection.createIndex()` + + * - :method:`db.resetError()` + - Not available + + * - :dbcommand:`resetError` + - Not available + + * - :dbcommand:`shardConnPoolStats` + - :dbcommand:`connPoolStats` + + * - :dbcommand:`unsetSharding` + - Not available Removed Parameters ------------------