Skip to content

P2: Usage examples moved to appropriate pages #624

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

Merged
merged 19 commits into from
Mar 18, 2025

Conversation

rachel-mack
Copy link
Contributor

@rachel-mack rachel-mack commented Feb 25, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-47267

Staging Links

  • command
  • crud/read-operations
  • crud/read-operations/geo
  • logging-monitoring/change-streams
  • crud/read-operations/count
  • crud/read-operations/distinct
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?
    • Are the facets and meta keywords accurate?

    Copy link

    netlify bot commented Feb 25, 2025

    Deploy Preview for docs-java ready!

    Name Link
    🔨 Latest commit a3f187e
    🔍 Latest deploy log https://app.netlify.com/sites/docs-java/deploys/67d98a333b8a9f0008ed7422
    😎 Deploy Preview https://deploy-preview-624--docs-java.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify site configuration.

    Copy link
    Contributor

    @rustagir rustagir left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    few important maintenance issues

    @@ -1,13 +1,27 @@
    .. _java-usage-count:
    .. _java-count:
    Copy link
    Contributor

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    S: per the renaming guidance, leave old anchors in place
    Q: will there be redirects for moving these pages around?

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I moved this tag down to the Count Documents Example: Full File, so that anyone referencing it will still be taking to the example.

    @rachel-mack rachel-mack requested a review from rustagir February 28, 2025 19:52
    Copy link
    Contributor

    @rustagir rustagir left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    lgtm with a few small nits!

    @rachel-mack
    Copy link
    Contributor Author

    rachel-mack commented Mar 4, 2025

    This ready for tech review.
    NOTE: Some of the documents have been moved, but the only content that has been changes is under the <Operator> Example: Full File heading on each page.
    All examples have been tested locally.

    @rachel-mack rachel-mack marked this pull request as ready for review March 4, 2025 14:40
    @rachel-mack rachel-mack requested a review from a team as a code owner March 4, 2025 14:40
    @rachel-mack rachel-mack requested review from jyemin and removed request for a team March 4, 2025 14:40
    In this guide, you can learn how to retrieve a list of distinct values for a
    field across a collection by calling the ``distinct()`` method on a
    ``MongoCollection`` object. Pass the document field name as the first parameter
    and the class you want to cast the results to as the second parameter as shown
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Technically, it's not a cast, since it's a generic type.

    Copy link
    Contributor Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    changed to:

    ...and the class you want to use for the results format as the second parameter...

    Let me know what you think

    ~~~~~~~~~~~~~~~~~

    The ``watch()`` method optionally takes an **aggregation pipeline** which
    consists of an array of **stages** as the first parameter to filter and
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Consider changing to: ".... as the first parameter, which can be used to filter and transform the change event output, as follows:`

    @rachel-mack rachel-mack requested a review from jyemin March 12, 2025 18:11
    Copy link
    Collaborator

    @jyemin jyemin left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    One grammar nit remaining, but I'll LGTM based on the technical content.

    In this guide, you can learn how to retrieve a list of distinct values for a
    field across a collection by calling the ``distinct()`` method on a
    ``MongoCollection`` object. Pass the document field name as the first parameter
    and the class you want to use for the results format as the second parameter as shown
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Suggested change
    and the class you want to use for the results format as the second parameter as shown
    and the class you want to use for the results as the second parameter, as shown

    Filter the Events
    ~~~~~~~~~~~~~~~~~

    The ``watch()`` method optionally takes an **aggregation pipeline** which
    Copy link
    Collaborator

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    This still doesn't read well to my ears. To many "which"s. Can you try to re-word it?

    @rachel-mack rachel-mack merged commit 9da3483 into mongodb:master Mar 18, 2025
    5 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    None yet
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants