Skip to content

Commit 0fbb687

Browse files
mungitoperritoandf-mongodb
authored andcommitted
DOCS-13849 remove documentation for ensureIndex
1 parent 4ab546e commit 0fbb687

File tree

4 files changed

+38
-49
lines changed

4 files changed

+38
-49
lines changed

source/reference/method.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ Collection
5050
- Wraps the :pipeline:`$group` aggregation stage with a :group:`$sum`
5151
expression to return a count of the number of documents in a
5252
collection or a view.
53-
54-
55-
* - :method:`db.collection.estimatedDocumentCount()`
56-
57-
- Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view.
5853

5954
* - :method:`db.collection.createIndex()`
6055

@@ -94,7 +89,11 @@ Collection
9489

9590
* - :method:`db.collection.ensureIndex()`
9691

97-
- Deprecated. Use :method:`db.collection.createIndex()`.
92+
- Removed. Use :method:`db.collection.createIndex()`.
93+
94+
* - :method:`db.collection.estimatedDocumentCount()`
95+
96+
- Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view.
9897

9998
* - :method:`db.collection.explain()`
10099

source/reference/method/db.collection.ensureIndex.txt

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,14 @@ db.collection.ensureIndex()
44

55
.. default-domain:: mongodb
66

7-
.. contents:: On this page
8-
:local:
9-
:backlinks: none
10-
:depth: 1
11-
:class: singlecol
7+
.. method:: db.collection.ensureIndex()
128

13-
Definition
14-
----------
9+
.. admonition:: Removed in 5.0
10+
:class: note
1511

16-
.. method:: db.collection.ensureIndex(keys, options)
12+
:method:`db.collection.ensureIndex()` has been replaced by
13+
:method:`db.collection.createIndex()`.
1714

15+
.. seealso::
1816

19-
.. include:: /includes/fact-mongo-shell-method.rst
20-
21-
22-
.. deprecated:: 3.0
23-
24-
:method:`db.collection.ensureIndex()` has been replaced by
25-
:method:`db.collection.createIndex()`.
26-
27-
Creates an index on the specified field if the index does not
28-
already exist.
29-
30-
Additional Information
31-
----------------------
32-
33-
- Use :method:`db.collection.createIndex()` rather than
34-
:method:`db.collection.ensureIndex()` to create new indexes.
35-
36-
- The :doc:`/indexes` section of this manual for full
37-
documentation of indexes and indexing in MongoDB.
38-
39-
- :method:`db.collection.getIndexes()` to view the specifications of
40-
existing indexes for a collection.
17+
:method:`db.collection.createIndex()`

source/reference/method/js-collection.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ Collection Methods
4646
expression to return a count of the number of documents in a
4747
collection or a view.
4848

49-
50-
* - :method:`db.collection.estimatedDocumentCount()`
51-
52-
- Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view.
53-
5449
* - :method:`db.collection.createIndex()`
5550

5651
- Builds an index on a collection.
@@ -89,7 +84,11 @@ Collection Methods
8984

9085
* - :method:`db.collection.ensureIndex()`
9186

92-
- Deprecated. Use :method:`db.collection.createIndex()`.
87+
- Removed. Use :method:`db.collection.createIndex()`.
88+
89+
* - :method:`db.collection.estimatedDocumentCount()`
90+
91+
- Wraps :dbcommand:`count` to return an approximate count of the documents in a collection or a view.
9392

9493
* - :method:`db.collection.explain()`
9594

@@ -229,7 +228,6 @@ Collection Methods
229228
/reference/method/db.collection.copyTo
230229
/reference/method/db.collection.count
231230
/reference/method/db.collection.countDocuments
232-
/reference/method/db.collection.estimatedDocumentCount
233231
/reference/method/db.collection.createIndex
234232
/reference/method/db.collection.createIndexes
235233
/reference/method/db.collection.dataSize
@@ -240,6 +238,7 @@ Collection Methods
240238
/reference/method/db.collection.dropIndex
241239
/reference/method/db.collection.dropIndexes
242240
/reference/method/db.collection.ensureIndex
241+
/reference/method/db.collection.estimatedDocumentCount
243242
/reference/method/db.collection.explain
244243
/reference/method/db.collection.find
245244
/reference/method/db.collection.findAndModify

source/release-notes/5.0-compatibility.txt

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,29 @@ versions of MongoDB.
1717
Removed Commands
1818
----------------
1919

20-
Starting in MongoDB 5.0, these commands are removed:
20+
Starting in MongoDB 5.0, these these database commands and
21+
:binary:`~bin.mongo` shell helper methods are removed:
2122

22-
- :dbcommand:`shardConnPoolStats` (use :dbcommand:`connPoolStats`
23-
instead). Deprecated since MongoDB 4.4.
23+
.. list-table::
24+
:header-rows: 1
2425

25-
- :dbcommand:`unsetSharding`. Deprecated since MongoDB 4.4.
26+
* - Removed Command
27+
- Alternative
2628

27-
- :dbcommand:`resetError` and :method:`db.resetError()`. Deprecated
28-
since MongoDB 1.6.
29+
* - :method:`db.collection.ensureIndex()`
30+
- :method:`db.collection.createIndex()`
31+
32+
* - :method:`db.resetError()`
33+
- Not available
34+
35+
* - :dbcommand:`resetError`
36+
- Not available
37+
38+
* - :dbcommand:`shardConnPoolStats`
39+
- :dbcommand:`connPoolStats`
40+
41+
* - :dbcommand:`unsetSharding`
42+
- Not available
2943

3044
Removed Parameters
3145
------------------

0 commit comments

Comments
 (0)