From f119a18aac491a3bcb5edd35e3572299df4ed425 Mon Sep 17 00:00:00 2001 From: Hannan Ali Date: Mon, 11 Jun 2018 21:02:27 +0500 Subject: [PATCH] Remove statement from $and operator document This query can be constructed without the help of explicit `and` using `$in` operator which is encourage to be used at any place possible instead of the `$or`. It discourages learners from trying out different methods and potentially adopting $in operator. An equivalent query could be as follows. ```js db.inventory.find({ price: { $in: [ 0.99, 1.99 ] }, $or: [ { sale: true }, { qty: { $lt: 20 } } ] }); ``` We can instead add the above mentioned query here or a helpful statement. Not adding anything for now. --- source/reference/operator/query/and.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/reference/operator/query/and.txt b/source/reference/operator/query/and.txt index 8cf33e50ef1..dccc422d38a 100644 --- a/source/reference/operator/query/and.txt +++ b/source/reference/operator/query/and.txt @@ -75,9 +75,6 @@ This query will select all documents where: - the ``sale`` field value is equal to ``true`` **or** the ``qty`` field value is less than ``20``. -This query cannot be constructed using an implicit ``AND`` operation, -because it uses the :query:`$or` operator more than once. - .. seealso:: :method:`~db.collection.find()`, :method:`~db.collection.update()`,