Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
*Location*: https://docs.mongodb.org/manual/reference/operator/update/pull/
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
*Referrer*: https://www.google.ca/
*Screen Resolution*: 1440 x 900
*repo*: docs
*source*: reference/operator/update/pull
*Location*: https://docs.mongodb.org/manual/reference/operator/update/pull/ *User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36 *Referrer*: https://www.google.ca/ *Screen Resolution*: 1440 x 900 *repo*: docs *source*: reference/operator/update/pull
Description
$gte should be $lte or the example should be updated
--------
The following operation will remove all items from the votes array that are greater than or equal to ($gte) 6:
db.profiles.update(
{ _id: 1 }, { $pull: { votes:
{ $gte: 6 }} } )
After the update operation, the document only has values less than 6: