[DOCS-3744] Comment on: "manual/reference/operator/update/pull.txt" Created: 10/Jul/14  Updated: 06/Aug/14  Resolved: 06/Aug/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.9

Type: Improvement Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/reference/operator/update/pull/
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
Referrer: https://www.google.com/
Screen Resolution: 1920 x 1080
repo: docs
source: reference/operator/update/pull


Participants:
Days since reply: 9 years, 28 weeks ago

 Description   

Please add a section describing how to $pull subdocuments from an array, since $elemMatch doesn't work and instead, we need to use (what I think is) a non-standard query operation.

For example, if you have this document:

{x: 0, y: [ {a:1} , {a:2} ]}

this works:

{$pull: {y: {a: 2}}}

but this does not:

{$pull: {y: {$elemMatch: {a: 2}}}}

see https://jira.mongodb.org/browse/SERVER-2016



 Comments   
Comment by Githook User [ 06/Aug/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-3744 pull and embedded documents
Branch: master
https://github.com/mongodb/docs/commit/ef1e01109aa17591ecf45f566045b9244acc765b

Generated at Thu Feb 08 07:46:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.