@@ -490,8 +490,8 @@ using the methods described in this section.
490
490
491
491
.. tip::
492
492
493
- The ``cond()`` method is similar to the ternary operator in Java and you
494
- should use it for simple branches based on a boolean value. You should use
493
+ The ``cond()`` method is similar to the ternary operator in {+language+} and you
494
+ can use it for simple branches based on boolean values. Use
495
495
the ``switchOn()`` methods for more complex comparisons such as performing
496
496
pattern matching on the value type or other arbitrary checks on the value.
497
497
@@ -585,7 +585,7 @@ can be one of a few different types, and you want to create a standardized value
585
585
indicating their membership level.
586
586
587
587
The ``switchOn()`` method checks each clause in order. If the value matches the
588
- type indicated by the clause, that clause determines the string value
588
+ type indicated by the clause, then the clause determines the string value
589
589
corresponding to the membership level. If the original value is a string, it
590
590
represents the membership level and that value is used. If the data type is a
591
591
boolean, it returns either ``Gold`` or ``Guest`` for the membership level. If
@@ -678,12 +678,12 @@ how the values compare:
678
678
One advantage of using the ``passTo()`` method is that you can reuse
679
679
your custom methods for other aggregations. You could
680
680
use the ``gradeAverage()`` method to find the average of grades for
681
- groups of students filtered by, for example, entry year or district, not just their
682
- class. You could use the ``evaluate()`` method to evaluate, for
681
+ groups of students filtered by entry year or district, not just their
682
+ class, for example . You could use the ``evaluate()`` method to evaluate, for
683
683
example, an individual student's performance, or an entire school's or
684
684
district's performance.
685
685
686
- The ``passArrayTo()`` method takes all of the students and calculates the
686
+ The ``passArrayTo()`` method takes an array of all students and calculates the
687
687
average score by using the ``gradeAverage()`` method. Then, the
688
688
``passNumberTo()`` method uses the ``evaluate()`` method to determine how the
689
689
classes are performing. This example stores the result as the ``evaluation``
@@ -823,7 +823,7 @@ using the methods described in this section.
823
823
* - `year() <{+core-api+}/com/mongodb/client/model/mql/MqlDate.html#year(com.mongodb.client.model.mql.MqlString)>`__
824
824
- :manual:`$year </reference/operator/aggregation/year/>`
825
825
826
- Suppose you have data about package deliveries and need to match
826
+ Suppose you have data about package deliveries and want to match
827
827
deliveries that occurred on any Monday in the ``"America/New_York"`` time
828
828
zone.
829
829
@@ -900,7 +900,7 @@ using the methods described in this section.
900
900
901
901
Suppose you have a collection of legacy customer data which includes
902
902
addresses as child documents under the ``mailing.address`` field. You want
903
- to find all the customers who currently live in Washington state. A
903
+ to find all the customers who live in Washington state. A
904
904
document in this collection might resemble the following:
905
905
906
906
.. code-block:: json
@@ -956,7 +956,7 @@ You can perform a map operation on a value of either type ``MqlMap`` or
956
956
957
957
.. tip::
958
958
959
- You should represent data as a map if the data maps
959
+ Represent data as a map if the data maps
960
960
arbitrary keys such as dates or item IDs to values.
961
961
962
962
.. list-table::
@@ -998,7 +998,7 @@ You can perform a map operation on a value of either type ``MqlMap`` or
998
998
999
999
Suppose you have a collection of inventory data where each document represents
1000
1000
an individual item you're responsible for supplying. Each document contains a
1001
- field that is a map of all your warehouses and how many copies they currently
1001
+ field that is a map of all your warehouses and how many copies they
1002
1002
have in their inventory of the item. You want to determine the total number of
1003
1003
copies of items you have across all of your warehouses. A document in this
1004
1004
collection might resemble the following:
@@ -1079,7 +1079,7 @@ using the methods described in this section.
1079
1079
* - `toUpper() <{+core-api+}/com/mongodb/client/model/mql/MqlString.html#toUpper()>`__
1080
1080
- :manual:`$toUpper </reference/operator/aggregation/toUpper/>`
1081
1081
1082
- Suppose you need to generate lowercase usernames for employees of a
1082
+ Suppose you want to generate lowercase usernames for employees of a
1083
1083
company from the employees' last names and employee IDs.
1084
1084
1085
1085
The ``append()`` method combines the ``lastName`` and ``employeeID`` fields into
0 commit comments