From b2e78031d73c4cbb0a8ce36ae1e845e6dd01a080 Mon Sep 17 00:00:00 2001 From: ian fogelman Date: Fri, 2 Jul 2021 15:48:56 -0400 Subject: [PATCH] DOCS-14610-complete-sentences --- ...te-documents-with-aggregation-pipeline.txt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/tutorial/update-documents-with-aggregation-pipeline.txt b/source/tutorial/update-documents-with-aggregation-pipeline.txt index 098ec0aded3..ce7853d9f48 100644 --- a/source/tutorial/update-documents-with-aggregation-pipeline.txt +++ b/source/tutorial/update-documents-with-aggregation-pipeline.txt @@ -60,9 +60,9 @@ aggregation pipeline to update the document with ``_id: 3``: Specifically, the pipeline consists of a :pipeline:`$set` stage which adds the ``test3`` field (and sets its value to ``98``) to the document and sets the ``modified`` field to the current datetime. -For the current datetime, the operation uses the aggregation -variable :variable:`NOW` for the (to access the variable, prefix with ``$$`` -and enclose in quotes). +The operation uses the aggregation variable :variable:`NOW` for the +current datetime. To access the variable, prefix with ``$$`` and enclose +in quotes. To verify the update, you can query the collection: @@ -120,14 +120,14 @@ Specifically, the pipeline consists of: :expression:`$mergeObjects` expression to set default values for the ``quiz1``, ``quiz2``, ``test1`` and ``test2`` fields. The aggregation variable :variable:`ROOT` refers to the current - document being modified (to access the variable, prefix with - ``$$`` and enclose in quotes). The current document fields will + document being modified. To access the variable, prefix with + ``$$`` and enclose in quotes. The current document fields will override the default values. - a :pipeline:`$set` stage to update the ``modified`` field to the - current datetime. For the current datetime, the operation uses the - aggregation variable :variable:`NOW` for the (to access the - variable, prefix with ``$$`` and enclose in quotes). + current datetime. The operation uses the aggregation variable + :variable:`NOW` for the current datetime. To access the variable, + prefix with ``$$`` and enclose in quotes. To verify the update, you can query the collection: @@ -192,9 +192,9 @@ Specifically, the pipeline consists of: of the ``tests`` array elements and to update the ``modified`` field to the current datetime. To calculate the truncated average, the stage uses the :group:`$avg` and :expression:`$trunc` - expressions. For the current datetime, the operation uses the - aggregation variable :variable:`NOW` for the (to access the - variable, prefix with ``$$`` and enclose in quotes) + expressions. The operation uses the aggregation variable + :variable:`NOW` for the current datetime. To access the variable, + prefix with ``$$`` and enclose in quotes. - a :pipeline:`$set` stage to add the ``grade`` field based on the ``average`` using the :expression:`$switch` expression.