[DOCS-2653] Suggestion for /manual/tutorial/remove-documents/ Created: 03/Feb/14  Updated: 12/Feb/14  Resolved: 12/Feb/14

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

Type: Improvement Priority: Minor - P4
Reporter: Jeremy Mikola Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: audit-2014
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 10 years, 1 week ago

 Description   

I suggest adding a semi-colon after shell JS statements. Maybe you only want to do that for multi-line examples, though.


Inconsistent formatting: you use a local footnote to suggest using drop() instead of a remove() without criteria, but in the "Remove Documents that Matches a Condition" section, a "Note:" block is used. I think a "Note:" block could be used for both.


For readability, I think the following lines:

The following example removes all documents that have type equal to food from the inventory collection:

The following example removes one document that have type equal to food from the inventory collection

...could be rewritten as:

The following example removes X document(s) from the inventory collection where the type field is equal to food:


Should we explicitly mention that remove() is limited to removing all or a single document at present? As is, we mention both methods of operation, but don't really say anything about a limited removal not being possible. Would it make sense to link to SERVER-4796 since this is an upcoming feature, or do we typically not reference JIRA tickets in documentation?


Additionally, I think a relevant use case is removing one document with respect to a sort order (e.g. removing the oldest document by some criteria). The only way I know to do this is with findAndModify(). There actually isn't an example of doing so on the findAndModify() page (no examples for the remove option, in fact). I think this would be a relevant outbound link on the db.collection.remove() page: tell users that if they need to remove a single document by some sort criteria, they can use findAndModify().



 Comments   
Comment by Githook User [ 12/Feb/14 ]

Author:

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

Message: DOCS-2653 tweaks to remove tutorial
Branch: v2.4
https://github.com/mongodb/docs/commit/a9850f8b4ef626c927d5f51f266e6c2d08553ff5

Comment by Githook User [ 12/Feb/14 ]

Author:

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

Message: DOCS-2653 tweaks to remove tutorial
Branch: master
https://github.com/mongodb/docs/commit/72b51d1301a0cbd3bcabaa09e6629b9793a031bc

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