MIM doesn't support $elemMatch in an $all query.
http://docs.mongodb.org/manual/reference/operator/query/all/
Example:
db.inventory.find( {
qty: { $all: [
{ "$elemMatch" : { size: "M", num: { $gt: 50} } },
{ "$elemMatch" : { num : 100, color: "green" } }
] }
} )
Here's my fix in Match.match:
if op == '$all':
for ele in value:
if type(ele) == dict and '$elemMatch' in ele:
if not self.match(key, '$elemMatch', ele['$elemMatch']):
return False
else:
if not self.match(key, '$eq', ele):
return False
return True
Anonymous
This still appears to be relevant for version 0.5.2