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

Range queries on arrays behave differently with indexes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.1
    • Component/s: Querying
    • Labels:
      None

      Description

      > 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}})
      >

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: