File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,23 @@ db.collection.ensureIndex()
6
6
7
7
.. method:: db.collection.ensureIndex(keys, options)
8
8
9
- .. admonition:: Removed in 5.0
10
- :class: note
9
+ .. note:: Removed in 5.0
11
10
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.
14
26
15
27
.. seealso::
16
28
You can’t perform that action at this time.
0 commit comments