Skip to content

Commit 1d95258

Browse files
author
Joe Bennett
committed
#42227 update phpdoc to recommend createIndex over ensureIndex
1 parent 3190775 commit 1d95258

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/lock.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ Such an index can be created manually:
768768

769769
.. code-block:: javascript
770770
771-
db.lock.ensureIndex(
771+
db.lock.createIndex(
772772
{ "expires_at": 1 },
773773
{ "expireAfterSeconds": 0 }
774774
)

session/database.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ performance. Run this from the `MongoDB shell`_:
549549
.. code-block:: javascript
550550
551551
use session_db
552-
db.session.ensureIndex( { "expires_at": 1 }, { expireAfterSeconds: 0 } )
552+
db.session.createIndex( { "expires_at": 1 }, { expireAfterSeconds: 0 } )
553553
554554
Configuring the Session Field Names
555555
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)