Skip to content

Commit 4ca19a0

Browse files
ianf-mongodbjeff-allen-mongo
authored andcommitted
DOCS-14610 correct sentences
1 parent 1dc19c9 commit 4ca19a0

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

source/tutorial/update-documents-with-aggregation-pipeline.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ Example 1
6767
Specifically, the pipeline consists of a :pipeline:`$set` stage
6868
which adds the ``test3`` field (and sets its value to ``98``) to the
6969
document and sets the ``modified`` field to the current datetime.
70-
For the current datetime, the operation uses the aggregation
71-
variable :variable:`NOW` for the (to access the variable, prefix with ``$$``
72-
and enclose in quotes).
70+
The operation uses the aggregation variable :variable:`NOW` for the
71+
current datetime. To access the variable, prefix with ``$$`` and enclose
72+
in quotes.
7373

7474
To verify the update, you can query the collection:
7575

@@ -125,18 +125,18 @@ Example 2
125125

126126
Specifically, the pipeline consists of:
127127

128-
- a :pipeline:`$replaceRoot` stage with an
128+
- a :pipeline:`$replaceRoot` stage with a
129129
:expression:`$mergeObjects` expression to set default values for
130130
the ``quiz1``, ``quiz2``, ``test1`` and ``test2`` fields. The
131131
aggregation variable :variable:`ROOT` refers to the current
132-
document being modified (to access the variable, prefix with
133-
``$$`` and enclose in quotes). The current document fields will
132+
document being modified. To access the variable, prefix with
133+
``$$`` and enclose in quotes. The current document fields will
134134
override the default values.
135135

136136
- a :pipeline:`$set` stage to update the ``modified`` field to the
137-
current datetime. For the current datetime, the operation uses the
138-
aggregation variable :variable:`NOW` for the (to access the
139-
variable, prefix with ``$$`` and enclose in quotes).
137+
current datetime. The operation uses the aggregation variable
138+
:variable:`NOW` for the current datetime. To access the variable,
139+
prefix with ``$$`` and enclose in quotes.
140140

141141
To verify the update, you can query the collection:
142142

@@ -201,11 +201,11 @@ Example 3
201201
- a :pipeline:`$set` stage to calculate the truncated average value
202202
of the ``tests`` array elements and to update the ``modified``
203203
field to the current datetime. To calculate the truncated average,
204-
the stage uses the :expression:`$avg` and :expression:`$trunc`
205-
expressions. For the current datetime, the operation uses the
206-
aggregation variable :variable:`NOW` for the (to access the
207-
variable, prefix with ``$$`` and enclose in quotes)
208-
204+
the stage uses the :group:`$avg` and :expression:`$trunc`
205+
expressions. The operation uses the aggregation variable
206+
:variable:`NOW` for the current datetime. To access the variable,
207+
prefix with ``$$`` and enclose in quotes.
208+
209209
- a :pipeline:`$set` stage to add the ``grade`` field based on the
210210
``average`` using the :expression:`$switch` expression.
211211

0 commit comments

Comments
 (0)