-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
----------------------------
Original Description
Description:
countDocuments function: returns the number of documents matching the filter
estimatedDocumentCount function: gets an estimate of the count of documents in a collection using collection metadatahttps://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#count-api-details
the count() helper is currently deprecated in the drivers, but we have not done so in the shell. There is a ticket for this: https://jira.mongodb.org/browse/SERVER-36436
Engineering Ticket Description:
countDocuments was a late change to the drivers for MongoDB 4.0 and is missing from the MongoDB Shell. Needs to be added in a future release.
----------------------------
Description
Scope of changes (files that need work and how much)
Add new pages
- db.collection.countDocuments.txt
- db.collection.estimatedDocumentCount.txt
+ redirect config/redirects and toc source/includes/ref-toc-method-collection.yaml
Add references
- source/core/transactions
- source/aggregation.
- source/core/views.txt
- source/includes/extracts-views.yaml
- source/reference/command/count.txt
- source/reference/method/db.collection.count.txt
- source/reference/operator/aggregation/count.txt
Impact to other docs outside of this product
None
MVP (work and date?)
Resources (e.g. Scope Docs, Invision)
- documents
-
SERVER-35989 Mongo shell needs a countDocuments function
- Closed
- related to
-
DOCS-12090 new count helper restrictions
- Closed