[SBE] $elemMatch with object filter returns no documents

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Query Execution 2021-03-08, Query Execution 2021-03-22
    • 167
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

       

      > db.test.find()
      { "_id" : ..., "a" : [ ] }
      { "_id" : ..., "a" : [ 1, 2, 3 ] }
      { "_id" : ..., "a" : [ {c: 1} ] }

       

      [Classic Engine]
      > db.test.find({a: {$not: {$elemMatch: {b: 1}}}}).toArray()
      [
       { "_id" : ..., "a" : [ ] },
       { "_id" : ..., "a" : [ 1, 2, 3 ] },
       { "_id" : ..., "a" : [ {c: 1} ] }
      ]
      

       

      [SBE]
      > db.test.find({a: {$not: {$elemMatch: {b: 1}}}}).toArray()
      [ ]
      

       

              Assignee:
              Drew Paroski
              Reporter:
              Nikita Lapkov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: