-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
None
MongoDB has implicit "and"ing of conditions, but sometimes it would be nice to have an actual $and operator for times when you need to specify multiple conditions on a single field (for example, making sure an array contains an item that meets criteria X and another item that meets criteria Y.
I [wrote this up](http://christophermaier.name/2010/12/21/mongodb-query-tricks.html) on my blog and detailed a workaround using $nor and $not, but it's kind of ugly and cumbersome to use in complicated queries. It would be nice if the query engine supported an actual $and operator to make things more clear for queries like these.
Thanks!