Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-40880

_id index is not displayed as unique

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Duplicate
    • Affects Version/s: 4.0.9
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      The automatically generated index on _id is a uniqe index as far as I have read and tried.
      But if you do db.collection.getIndexes() in the mongo shell, the index does not show "unique" : true, like other unique indexes do.
      This seems a bit confusing to me.
      Shouldn't the _id index be shown as unique, as it actually is a unique index?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              vampire Björn Kautler
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: