From ea867ab3f52d5a9186d1199f1f5a68883b13f17a Mon Sep 17 00:00:00 2001 From: nickldp <135850974+nickldp@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:19:01 -0400 Subject: [PATCH] DOCSP-39726: Usage Example that describe query (#114) # Pull Request Info [PR Reviewing Guidelines](https://github.com/mongodb/docs-java/blob/master/REVIEWING.md) [JIRA ](https://jira.mongodb.org/browse/DOCSP-30726#r1226735778) Staging - [UpdateMany](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-39726-Usage-Example-describe-query/usage-examples/updateMany/) page, [updateOne](https://docs-mongodbcom-staging.corp.mongodb.com/kotlin/docsworker-xlarge/DOCSP-39726-Usage-Example-describe-query/usage-examples/updateOne/) page ## Self-Review Checklist - [x] Is this free of any warnings or errors in the RST? - [x] Did you run a spell-check? - [x] Did you run a grammar-check? - [x] Are all the links working? (cherry picked from commit 7c36250456e87f0e97d8e674872fe4b9258759a7) --- source/usage-examples/updateMany.txt | 7 +++++-- source/usage-examples/updateOne.txt | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/usage-examples/updateMany.txt b/source/usage-examples/updateMany.txt index 6c48306c..339cf083 100644 --- a/source/usage-examples/updateMany.txt +++ b/source/usage-examples/updateMany.txt @@ -56,8 +56,11 @@ bottom of this page. Example ------- -In this example, we update documents that match our query in the ``movies`` -collection of the ``sample_mflix`` database. We perform the following +In this example, we use a ``Filter`` builder to filter our query for +movies in the genre "Frequently Discussed". + +Next, we update documents that match our query in the ``movies`` collection of the +``sample_mflix`` database. We perform the following updates to the matching documents: - Add ``Frequently Discussed`` to the array of ``genres`` only if it does not diff --git a/source/usage-examples/updateOne.txt b/source/usage-examples/updateOne.txt index c239e9ab..6cd6b11c 100644 --- a/source/usage-examples/updateOne.txt +++ b/source/usage-examples/updateOne.txt @@ -54,7 +54,10 @@ bottom of this page. Example ------- -In this example, we perform the following updates to the first match for our query +In this example, we use a ``Filter`` builder to query the collection for +a movie with the title "Cool Runnings 2". + +Next, we perform the following updates to the first match for our query in the ``movies`` collection of the ``sample_mflix`` database: #. Set the value of ``runtime`` to ``99``