The example given in this lecture for when to use and
is:
db.movieDetails.find(
{
$and: [
{
"metacritic":
{
$ne: null
}
},
{
"metacritic":
{
$exists: true
}
}
]
}
)
But, after a quick test you can just do this:
db.movieDetails.find(
{
"metacritic":
{
$ne: null,
$exists: true
}
}
)
So my question is, why use AND if these are already implicitly AND’ed together anyway?