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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
    • Operating System:
      ALL

      Description

      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}

      .

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: