Skip to content

Commit 2d9bcf9

Browse files
andf-mongodbschmalliso
authored andcommitted
DOCSP-14923 fix deprecated directive for NextGen
1 parent 789c012 commit 2d9bcf9

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

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

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@ db.collection.ensureIndex()
66

77
.. method:: db.collection.ensureIndex(keys, options)
88

9-
.. admonition:: Removed in 5.0
10-
:class: note
9+
.. note:: Removed in 5.0
1110

12-
:method:`db.collection.ensureIndex()` has been replaced by
13-
:method:`db.collection.createIndex()`.
11+
.. include:: /includes/fact-mongo-shell-method.rst
12+
13+
.. deprecated:: 3.0
14+
15+
:method:`db.collection.ensureIndex()` has been replaced by
16+
:method:`db.collection.createIndex()`.
17+
18+
Creates an index on the specified field if the index does not
19+
already exist.
20+
21+
Additional Information
22+
----------------------
23+
24+
- Use :method:`db.collection.createIndex()` rather than
25+
:method:`db.collection.ensureIndex()` to create new indexes.
1426

1527
.. seealso::
1628

0 commit comments

Comments
 (0)