Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Windows 7
Description
Hi, I am trying to use ensureIndex for my collection using Java Driver of MongoDB. I want to have an unique index to be placed on my collection. I have used usercollection.ensureIndex(new BasicDBObject("id", 1).append("unique", true));. Please help me with the correct code to be used.