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

indexing arrays breaks some queries

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

      Tried this on 1.2.3:

      > db.test.drop();
      true
      > db.test.save(

      { list: [1, 2] }

      );
      > db.test.save(

      { list: [1, 3] }

      );
      > db.test.find( { list:

      { $in: [1], $ne: 3 }

      } );

      { "_id" : ObjectId("4b8536ef71f969641118df0b"), "list" : [ 1, 2 ] }

      > db.test.ensureIndex(

      { list: 1 }

      );
      > db.test.find( { list:

      { $in: [1], $ne: 3 }

      } );

      { "_id" : ObjectId("4b8536ef71f969641118df0b"), "list" : [ 1, 2 ] } { "_id" : ObjectId("4b8536f371f969641118df0c"), "list" : [ 1, 3 ] }

            Assignee:
            aaron Aaron Staple
            Reporter:
            ibwhite Ian White
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: