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

$nor operator behaves differently when comparing arrays of dates

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.5.3
    • Component/s: Querying
    • Environment:
    • ALL

      Appears to be a change in behavior between 2.4.5 and 2.5.4-Pre how $nor evaluate dates.

      Reproduce

      db.q.drop()
      db.q.insert( { "b" : [ [ ISODate("2008-02-29") ] , "An inventor is simply a fellow who doesnt take his education too seriously." ] } )
      db.q.insert( { "d" : { "b" : { "c" : { "b" : { "b" : { "c" : "Everyone is a genius at least once a year. The real geniuses simply have their bright ideas closer together." } } } } } , "b" : [ [ ISODate("2013-09-29") ] ] } )
      db.q.find({ $nor : [ { "b" : { $gte : [ Date(1204243200000)] } } ] }).itcount()
      db.q.find({ $nor : [ { "b" : { $gte : [ ISODate("2008-02-29")] } } ] }).itcount()
      

      2.4.5: Zero documents returned for each query
      2.5.4-Pre: 2 Documents returned for each query

            Assignee:
            hari.khalsa@10gen.com hari.khalsa@10gen.com
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: