-
Type: Task
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Documentation
-
Environment:Windows 7
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.