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

Null matching on fields in docs in arrays changed from 2.4 to 2.5

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

      Seems like in 2.5 there is a difference in matching null fields for arrays.

      Quick repro of issue:

      db.test.insert({a: [{b:1}, {c:1}]})
      db.test.find({"a.b": null})
      

      document is not found in 2.4.8, but is found in 2.5.5-pre (built morning of 11/19)

      The way to think about this is that "there is some element in the array such that the predicate is true." In the example above, there is a "path" such that a.b is null and that is the sub-document element

      {c:1}

      .

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            andrew.emil@10gen.com Andrew Emil (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: