I have been trying to use compass due to your recommendation. It is great for debugging an aggregation. However it seems to be failing with the following:
// This works in the shell
db.movies.aggregate([
{
$match: {
countries: 'USA',
'tomatoes.viewer.rating': { $gte: 3 },
$expr: { $isArray: '$cast' }
}
},
{ $limit: 1 }
])
// But this fails in compass for the $expr
{
countries: 'USA',
'tomatoes.viewer.rating': { $gte: 3 },
$expr: { $isArray: '$cast' }
}
What am I doing wrong in Compass?