Hey!
I’m trying to make an aggregation, but it fails with error “unknown top level operator: $eq”. What am I doing wrong?
db.movies.aggregate([{$match: {$eq: [{$size: {$split: ["$title", " "]}}, 1]}}])
The logics is that I’m trying to match all documents, that have size of splitted by " " symbol field named “title” equal to 1 (means have just one word in it).
P.S. Changed query’s logic and made it work with two stages, but still I would like to understand, why I can’t just make one $match query.