[DOCS-6029] Comment on: "manual/reference/method/db.collection.ensureIndex.txt" Created: 14/Aug/15  Updated: 03/Nov/17  Resolved: 14/Aug/15

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/reference/method/db.collection.ensureIndex/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36
Referrer: https://www.google.com.br/
Screen Resolution: 1366 x 768
repo: docs
source: reference/method/db.collection.ensureIndex


Participants:
Days since reply: 8 years, 26 weeks, 5 days ago

 Description   

We need example with code.



 Comments   
Comment by Allison Reinheimer Moore [ 14/Aug/15 ]

db.collection.ensureIndex() was deprecated in MongoDB 3.0. It's now an alias of db.collection.createIndex() . You can find examples of how to create an index with db.collection.createIndex() on its reference page.

Generated at Thu Feb 08 07:51:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.