MongoDB Documentation, Release 3.0.4 864 Chapter 12. Release Notes null Comparison Queries Description $all Operator Behavior Change Description $mod Operator Enforces Strict Syntax db.orders.find( { price: { $not: { $gte: 50 } } } ) In 2.6, the query returns the following documents: In previous versions, indexed plans would only return matching documents where the type of the field matches the type of the query predicate: { "_id" : 1, "status" : "A", "cust_id" : "123", "price" : 40 } If using a collection scan, previous versions would return the same results as those in 2.6. • MongoDB 2.6 allows chaining of $not expressions. { "_id" : 3, "status" : "D", "cust_id" : "xyz" } { "_id" : 1, "status" : "A", "cust_id" : "123", "price" : 40 } { "_id" : 2, "status" : "A", "cust_id" : "xyz", "price" : "N/A" } • $lt and $gt comparisons to null no longer match documents that are missing the field. • null equality conditions on array elements (e.g. "a.b": null ) no longer match document missing the nested field a.b (e.g. a: [ 2, 3 ] ). • null equality queries (i.e. field: null ) now match fields with values undefined . • The $all operator is now equivalent to an $and operation of the specified values. This change in behavior can allow for more matches than previous versions when passed an array of a single nested array (e.g. [ [ "A" ] ] ). When passed an array of a nested array, $all can now match documents where the field contains the nested array as an element (e.g. field: [ [ "A" ], ... ] ), or the field equals the nested array (e.g. field: [ "A", "B" ] ). Earlier version could only match documents where the field contains the nested array. • The $all operator returns no match if the array field contains nested arrays (e.g. field: [ "a", ["b"] ] ) and $all on the nested field is the element of the nested array (e.g. "field.1": { $all: [ "b" ] } ). Previous versions would return a match. Description The $mod operator now only accepts an array with exactly two elements, and errors when passed an array with fewer or more elements. See mod-not-enough-elements and mod-too-many-elements for details. Solution Ensure that the array passed to $mod contains exactly two elements: • If the array contains the a single element, add 0 as the second element. • If the array contains more than two elements, remove the extra elements. In previous versions, if passed an array with one element, the $mod operator uses 0 as the second element, and if passed an array with more than two elements, the $mod ignores all but the first two elements. Previous versions do return an error when passed an empty array.