-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOCSP-41137: Count Documents #4
Conversation
✅ Deploy Preview for docs-kotlin-sync ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Added some suggestions / questions
source/read.txt
Outdated
.. TODO: To learn more about the ``count_documents()`` method, see the | ||
.. :ref:`kotlin-sync-accurate-count` guide. | ||
To learn more about the ``countDocuments()`` method, see the | ||
:ref:`kotlin-sync-accurate-count` guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: since you're linking to a section within the Count Documents guide, I'd reword to something like:
:ref:`kotlin-sync-accurate-count` guide. | |
:ref:`kotlin-sync-accurate-count` section of the Count Documents guide. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applies to the two links below as well
number of documents in a collection. | ||
|
||
.. _kotlin-sync-accurate-count: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: not necessary, but it might be helpful to use one of the Atlas sample datasets for the code examples on this page and introduce it here (similar to the C++ count documents page). This could help make the current code examples a little more specific and would provide an output
|
||
* - ``hint`` | ||
- | Gets or sets the index to scan for documents. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: I think it would be helpful to add a code example here that passes an options argument
source/read/count.txt
Outdated
* - ``collection`` | ||
- | An instance of ``Collation``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: should this say "collation" instead of "collection"? Also, you could make the description a little more specific:
* - ``collection`` | |
- | An instance of ``Collation``. | |
* - ``collection`` | |
- | The collation to use for the operation. |
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
The ``countDocuments()`` method accepts optional parameters in the form of a | ||
``CountOptions`` object, which represents options you can use to configure the count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: how do you set these options - by specifying fields of a CountOptions
object? Might be good to clarify that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add some clarifying wording.
source/read/count.txt
Outdated
You can get an estimate of the number of documents in a collection by calling | ||
the ``estimatedDocumentCount()`` method. The method estimates the amount of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: to match the syntax of the accurate count section:
You can get an estimate of the number of documents in a collection by calling | |
the ``estimatedDocumentCount()`` method. The method estimates the amount of | |
Use the ``estimatedDocumentCount()`` method to retrieve an estimate of the number of documents in a collection. The method estimates the amount of |
source/read/count.txt
Outdated
:widths: 30 70 | ||
:header-rows: 1 | ||
|
||
* - Property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: "Field" or "Option" might be better words than "Property" here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM + one small suggestion
source/read/count.txt
Outdated
|
||
To return a count of documents that match specific search criteria, specify your query | ||
in the ``countDocuments()`` method. The following example prints a count of all documents | ||
in the ``movies`` collection with a ``year`` field value equal to ``1930``: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: to avoid "with":
in the ``movies`` collection with a ``year`` field value equal to ``1930``: | |
in the ``movies`` collection that have a ``year`` field value equal to ``1930``: |
(cherry picked from commit b9a7270)
(cherry picked from commit b9a7270)
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-41137
Staging - https://preview-mongodbmcmorisi.gatsbyjs.io/kotlin-sync/DOCSP-41137-count-docs/read/count/
Self-Review Checklist