File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
source/reference/operator/aggregation Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -115,10 +115,12 @@ the :dbcommand:`aggregate` command.
115
115
var cur = db.names.aggregate( [
116
116
{ $changeStream: {} }
117
117
] )
118
- cur.next()
119
118
120
- When the change stream detects a change, the ``next()`` method returns a change
121
- event notification. For example:
119
+ To open the cursor, run ``cur``.
120
+
121
+ When the change stream detects a change, the ``next()`` method returns
122
+ a change event notification. For example, after running ``cur.next()``,
123
+ MongoDB returns a document similar to the following:
122
124
123
125
.. code-block:: json
124
126
:copyable: false
@@ -142,5 +144,5 @@ event notification. For example:
142
144
}
143
145
144
146
For more information on change stream notifications, see :ref:`Change Events
145
- <change-events>`
147
+ <change-events>`.
146
148
You can’t perform that action at this time.
0 commit comments