On the 2014-01-02 nightly:
> db.x.find({x: {$elemMatch: {y: 12, $or:[{z: 1}, {z: 2}]}}}) > db.x.find({x: {$elemMatch: {$or:[{z: 1}, {z: 2}], y: 12}}}) error: { "$err" : "Can't canonicalize query: BadValue unknown operator: $or", "code" : 17287 }
Both work in 2.4.9. I would expect that either both of these queries would work or both would fail.
- is related to
-
SERVER-11537 Incosistent behavior with $or and $elemMatch
- Closed