Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
The example code in the quick start tutorial for indexing and dropping duplicates does not work.
http://docs.mongodb.org/manual/tutorial/create-a-unique-index/
Change:
db.collection.ensureIndex(
,
{ dropDups: true })
To:
db.collection.ensureIndex(
,
{ unique: true, dropDups: true })
The working code is already in the documentation:
http://docs.mongodb.org/manual/core/indexes/#drop-duplicates
It's confusing because it seems implied that the duplicates will actually be dropped but they will not if you simply copy+paste the example code.