Skip to content

Commit 681e79d

Browse files
committed
LM PR fixes 2
1 parent bc8dc34 commit 681e79d

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

snooty.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ toc_landing_pages = [
3030
"/security",
3131
"/data-formats",
3232
"/upgrade",
33-
"/aggregation"
33+
"/aggregation",
3434
]
3535

3636
sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"

source/builders.txt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,14 @@ guide.
185185
Define an Update Document
186186
-------------------------
187187

188-
You can use factory methods from the ``Stage`` builder class to update
189-
or create field values in your update operations. To learn more about
190-
updating documents, see the :ref:`php-write-update` guide.
188+
You can use the ``Stage::set()`` factory method when creating update
189+
documents. Update documents describe the updates to make to target
190+
documents. To learn more about updating documents, see the
191+
:ref:`php-write-update` guide.
191192

192-
.. important:: Only $set Operator Supported
193+
.. important:: Only $set Operator Supported in Update Documents
193194

194-
The only update operation that you can express by using builders uses
195+
The only update operation that you can express with builders uses
195196
the ``$set`` operator. This operator allows you to replace the value of
196197
a field with a specified value or create a new field that has a specified
197198
value. To learn more, see the :manual:`$set </reference/operator/update/set/>`
@@ -220,7 +221,7 @@ This example performs the following actions:
220221

221222
- Uses the ``Query::eq()`` factory method to match documents in which
222223
the ``watlev`` field value is ``'partly submerged at high water'``
223-
- Uses the ``Stage::set()`` method to update the ``year`` field to ``1870``
224+
- Uses the ``Stage::set()`` method to set the ``year`` field to ``1870``
224225
- Calls the :phpmethod:`MongoDB\Collection::updateOne()`
225226
method to perform the update
226227
- Prints the number of updated documents
@@ -276,10 +277,10 @@ You can pass this pipeline to the following methods:
276277

277278
This example performs the following actions:
278279

279-
- Uses the ``Stage::match()`` method to filter for only update change
280-
events
281-
- Uses the ``Stage::project()`` method to output only the specified change
282-
event fields
280+
- Uses the ``Stage::match()`` method to filter for only change
281+
events for update operations
282+
- Uses the ``Stage::project()`` method to output only the
283+
``operationType``, ``ns`` (namespace), and ``fullDocument`` fields
283284
- Calls the :phpmethod:`MongoDB\Collection::watch()`
284285
method to open the change stream and sets the ``fullDocument`` option
285286
to output the full document after update
@@ -304,3 +305,6 @@ This example performs the following actions:
304305
"fullDocument":{"_id":...,"feature_type":"Wrecks - Visible",...},
305306
"ns":{"db":"sample_geospatial","coll":"shipwrecks"}
306307
}
308+
309+
To learn more about the information provided by change events, see
310+
:manual:`Change Events <reference/change-events/>` in the {+mdb-server+} manual.

0 commit comments

Comments
 (0)