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

Range queries on arrays behave differently with indexes

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.9.1
    • Affects Version/s: None
    • Component/s: Querying
    • None

      > db.test.insert(

      {a:[1,10]}

      )
      > db.test.find({a: {$gt: 2, $lt:5}})

      { "_id" : ObjectId("4bb9be0accf9c6e519c4d1fe"), "a" : [ 1, 10 ] }

      > db.test.ensureIndex(

      {a:1}

      )
      > db.test.find({a: {$gt: 2, $lt:5}})
      >

            Assignee:
            aaron Aaron Staple
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: