Skip to content

Commit 9d33de1

Browse files
committed
vale
1 parent bf5fbac commit 9d33de1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/aggregation/agg-exp-ops.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ using the methods described in this section.
490490

491491
.. tip::
492492

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
495495
the ``switchOn()`` methods for more complex comparisons such as performing
496496
pattern matching on the value type or other arbitrary checks on the value.
497497

@@ -585,7 +585,7 @@ can be one of a few different types, and you want to create a standardized value
585585
indicating their membership level.
586586

587587
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
589589
corresponding to the membership level. If the original value is a string, it
590590
represents the membership level and that value is used. If the data type is a
591591
boolean, it returns either ``Gold`` or ``Guest`` for the membership level. If
@@ -678,12 +678,12 @@ how the values compare:
678678
One advantage of using the ``passTo()`` method is that you can reuse
679679
your custom methods for other aggregations. You could
680680
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
683683
example, an individual student's performance, or an entire school's or
684684
district's performance.
685685

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
687687
average score by using the ``gradeAverage()`` method. Then, the
688688
``passNumberTo()`` method uses the ``evaluate()`` method to determine how the
689689
classes are performing. This example stores the result as the ``evaluation``
@@ -823,7 +823,7 @@ using the methods described in this section.
823823
* - `year() <{+core-api+}/com/mongodb/client/model/mql/MqlDate.html#year(com.mongodb.client.model.mql.MqlString)>`__
824824
- :manual:`$year </reference/operator/aggregation/year/>`
825825

826-
Suppose you have data about package deliveries and need to match
826+
Suppose you have data about package deliveries and want to match
827827
deliveries that occurred on any Monday in the ``"America/New_York"`` time
828828
zone.
829829

@@ -900,7 +900,7 @@ using the methods described in this section.
900900

901901
Suppose you have a collection of legacy customer data which includes
902902
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
904904
document in this collection might resemble the following:
905905

906906
.. code-block:: json
@@ -956,7 +956,7 @@ You can perform a map operation on a value of either type ``MqlMap`` or
956956

957957
.. tip::
958958

959-
You should represent data as a map if the data maps
959+
Represent data as a map if the data maps
960960
arbitrary keys such as dates or item IDs to values.
961961

962962
.. list-table::
@@ -998,7 +998,7 @@ You can perform a map operation on a value of either type ``MqlMap`` or
998998

999999
Suppose you have a collection of inventory data where each document represents
10001000
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
10021002
have in their inventory of the item. You want to determine the total number of
10031003
copies of items you have across all of your warehouses. A document in this
10041004
collection might resemble the following:
@@ -1079,7 +1079,7 @@ using the methods described in this section.
10791079
* - `toUpper() <{+core-api+}/com/mongodb/client/model/mql/MqlString.html#toUpper()>`__
10801080
- :manual:`$toUpper </reference/operator/aggregation/toUpper/>`
10811081

1082-
Suppose you need to generate lowercase usernames for employees of a
1082+
Suppose you want to generate lowercase usernames for employees of a
10831083
company from the employees' last names and employee IDs.
10841084

10851085
The ``append()`` method combines the ``lastName`` and ``employeeID`` fields into

0 commit comments

Comments
 (0)