[JAVA-1197] DBCollection.createIndex/ensureIndex deprecation notice is flipped from MongoDB Manual documentation Created: 01/May/14 Updated: 08/Oct/15 Resolved: 08/Oct/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | API |
| Affects Version/s: | 2.12.1 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Hendy Irawan | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
MongoDB Manual recommends ensureIndex : http://docs.mongodb.org/manual//tutorial/create-an-index/ and deprecates createIndex since very long ago: http://docs.mongodb.org/manual//reference/method/db.collection.createIndex/ db.collection.createIndex(keys, options) Creates indexes on collections. Java API is the other way around, recommends createIndex: http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#createIndex(com.mongodb.DBObject) : createIndex and deprecates ensureIndex : http://api.mongodb.org/java/current/com/mongodb/DBCollection.html#ensureIndex(com.mongodb.DBObject) ensureIndex |
| Comments |
| Comment by Jeffrey Yemin [ 08/Oct/15 ] |
|
Now that the server has implemented a createIndexes command, the driver is going to prefer that name over ensureIndex. I hope this clarifies the situation. So closing this as Works as Designed. |