ensureIndex records arbitrary direction objects

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: Index Maintenance
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.test5.ensureIndex(

      {x:"foo"}

      )
      > db.test5.getIndexes()
      [
      {
      "name" : "id",
      "ns" : "test.test5",
      "key" :

      { "_id" : 1 }

      },
      {
      "_id" : ObjectId("4d46194d53ffe3441923319f"),
      "ns" : "test.test5",
      "key" :

      { "x" : "foo" }

      ,
      "name" : "x_",
      "v" : 0
      }
      ]

      It seems like it should be 1 of the 3 possible values when it is stored.

              Assignee:
              Unassigned
              Reporter:
              Scott Hernandez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: