Skip to content

Commit 16e4508

Browse files
committed
Further feedback
1 parent d1557b7 commit 16e4508

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/read/change-streams.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ as it occurs. The printed change event resembles the
8484
following:
8585

8686
.. code-block:: json
87+
:emphasize-lines: 14-20
8788

8889
{
8990
"cursor": {
@@ -130,11 +131,11 @@ You can specify the following stages in the ``pipeline`` parameter:
130131
- ``$set``
131132
- ``$unset``
132133

133-
Open a Change Stream with a Pipeline Example
134-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134+
Match Specific events Example
135+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
135136

136-
The following example uses the ``pipeline`` parameter to open a change stream
137-
that records only update operations:
137+
The following example uses the ``pipeline`` parameter that includes a ``$match``
138+
to open a change stream that only records update operations:
138139

139140
.. literalinclude:: /includes/read/change-streams.kt
140141
:start-after: start-change-stream-pipeline
@@ -215,8 +216,8 @@ change, chain the ``fullDocumentBeforeChange()`` or the ``fullDocument()``
215216
methods to the ``watch()`` method.
216217

217218
The **pre-image** is the full version of a document *before* a change. To include the
218-
pre-image in the change stream event, pass the ``fullDocumentBeforeChange()`` method
219-
one of the following parameters:
219+
pre-image in the change stream event, pass one of the following options to the
220+
``fullDocumentBeforeChange()`` method:
220221

221222
- ``FullDocumentBeforeChange.WHEN_AVAILABLE``: The change event includes a pre-image of the
222223
modified document for change events only if the pre-image is available.
@@ -225,8 +226,8 @@ one of the following parameters:
225226
driver raises an error.
226227

227228
The **post-image** is the full version of a document *after* a change. To include the
228-
post-image in the change stream event, pass the ``fullDocument()`` method one of the
229-
following parameters:
229+
post-image in the change stream event, pass one of the following options to the
230+
``fullDocument()`` method:
230231

231232
- ``FullDocument.UPDATE_LOOKUP``: The change event includes a copy of the entire changed
232233
document from some time after the change.
@@ -237,7 +238,7 @@ following parameters:
237238
driver raises an error.
238239

239240
The following example calls the ``watch()`` method on a collection and includes the post-image
240-
of updated documents by specifying the ``fullDocument`` parameter:
241+
of updated documents in the results by specifying the ``fullDocument`` parameter:
241242

242243
.. literalinclude:: /includes/read/change-streams.kt
243244
:start-after: start-change-stream-post-image
@@ -250,8 +251,7 @@ With the change stream application running, updating a document in the
250251
``restaurants`` collection by using the :ref:`preceding update example
251252
<kotlin-sync-change-stream-update>` prints a change event resembling the following:
252253

253-
254-
.. code-block:: sh
254+
.. code-block:: none
255255

256256
ChangeStreamDocument{ operationType=update, resumeToken={"_data": "..."},
257257
namespace=sample_restaurants.restaurants, destinationNamespace=null, fullDocument=Restaurant(name=Blarney Castle, cuisine=Irish),

0 commit comments

Comments
 (0)