Details
-
Bug
-
Resolution: Done
-
Critical - P2
-
None
-
None
-
None
-
None
Description
The documentation appears wrong on the topic of what dropDups does. The page says:
dropDups (Boolean) – Specify true when creating a unique index, on a field that may have duplicate to index only the first occurrence of a key, and ignore subsequent occurrences of that key.
http://docs.mongodb.org/manual/reference/javascript/#db.collection.ensureIndex
but in fact, dropDups will drop documents from the collection to ensure that the index is unique. the documents are not ignored.