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

indexing arrays breaks some queries

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 1.2.3
    • 1.3.4
    • Querying
    • None

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: