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

Compound index creation does not follow the order we specifiy

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.6.0
    • Component/s: None
    • None
    • Windows
    • Hide

      1. Create a compound index-
      db.collection1.ensureIndex(

      {"ClassId":1,"ModifiedDate":1}

      )

      2. After index is created, run collection1.stats() to look at the index created.
      You see "ModifiedDate_1_ClassId_1" instead of "ClassId_1_ModifiedDate_1"

      Show
      1. Create a compound index- db.collection1.ensureIndex( {"ClassId":1,"ModifiedDate":1} ) 2. After index is created, run collection1.stats() to look at the index created. You see "ModifiedDate_1_ClassId_1" instead of "ClassId_1_ModifiedDate_1"

      When we create a compound index specifying a certain order of fields the order is reversed when the index is created.

            Assignee:
            Unassigned Unassigned
            Reporter:
            dcsjaj Arun Devaraj
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: