Let's look at the two examples below.
Rs1: PRIMARY> db. display. find ({$ and: [{$ where: '(1386813645-this. last_active_time> 300) '}, {status: "online"}]}). count () 0rs1: PRIMARY> db. display. find ({$ where: '( 1386813645-this. last_active_time> 300) '}, {status: "online "}). count () 0 the second is equivalent to the first, which is an implicit logic and operation. For a long time, there is only the second Medium form, which may be to be more complete. After 2.0, MongoDB introduced the first form.
Reference: http://docs.mongodb.org/manual/reference/operator/query/and/
The document also mentions another method of use, that is, when performing logic and operations on a field, it can be abbreviated as follows:
Db. inventory. update ({price: {$ ne: 1.99, $ exists: true },{ $ set: {qty: 15 }})
The qty value is updated to 15 only when the price is not equal to 1.99 and exists.
Therefore, my conclusion is that it is generally good to use implicit, which is easy to write.