Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-790

Docs wrong on the topic of dropDups

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical - P2 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.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            erlichson Andrew Erlichson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11 years, 12 weeks, 2 days ago