How can I build an $or query for MongoDB using the Java driver?
You are correct that the “default” for specifying multiple field in a query is that each field serves as a conditional filter, and thus is an AND operation. You can perform MongoDB queries with an OR clause by using the $or operand which has the following syntax : db.col.find({$or:[clause1, clause2]}) Where each clause can be … Read more