[DOCS-6460] Comment on: "manual/reference/operator/update/pull.txt" Created: 27/Oct/15 Updated: 12/Dec/16 Resolved: 31/Mar/16 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Docs Collector User (Inactive) | Assignee: | Steve Renaker (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: https://docs.mongodb.org/manual/reference/operator/update/pull/ |
||
| Participants: | |
| Days since reply: | 7 years, 9 weeks, 6 days ago |
| Description |
|
$gte should be $lte or the example should be updated -------- db.profiles.update( { _id: 1 }, { $pull: { votes: { $gte: 6 }} } ) After the update operation, the document only has values less than 6: |
| Comments |
| Comment by Steve Renaker (Inactive) [ 08/Dec/16 ] | |||
|
Hi Emily – I'm not sure what's going on with this ticket. Did you want to | |||
| Comment by Steve Renaker (Inactive) [ 31/Mar/16 ] | |||
|
I believe this example is behaving as expected. The operation isn't expected to return the values greater than or equal to 6; it removes them from the array. The document at the end of the example:
shows the document's contents after the $pull operation. Thanks for getting involved, and let me know if anything still doesn't seem right. |