@@ -148,8 +148,8 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
148148 * The added fields are defined using {@link Selectable}s, which can be:
149149 *
150150 * - {@link Field}: References an existing document field.
151- * - {@link Function }: Performs a calculation using functions like `add`, `multiply` with
152- * assigned aliases using {@link Expr#as}.
151+ * - {@link Expr }: Either a literal value (see { @link Constant}) or a computed value
152+ * (see { @FunctionExpr }) with an assigned alias using {@link Expr#as}.
153153 *
154154 * Example:
155155 *
@@ -353,22 +353,21 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
353353 return this . _addStage ( new Limit ( limit , convertedFromLimitToLast ) ) ;
354354 }
355355
356+
356357 /**
357- * Returns a set of distinct { @link Expr} values from the inputs to this stage.
358+ * Returns a set of distinct values from the inputs to this stage.
358359 *
359- * <p> This stage run through the results from previous stages to include only results with unique
360- * combinations of {@link Expr} values ({@link Field}, {@link Function}, etc. ).
360+ * This stage runs through the results from previous stages to include only results with
361+ * unique combinations of {@link Expr} values ({@link Field}, {@link Function}, etc).
361362 *
362- * <p> The parameters to this stage are defined using {@link Selectable} expressions or { @code string}s :
363+ * The parameters to this stage are defined using {@link Selectable} expressions or strings :
363364 *
364- * <ul>
365- * <li>{@code string}: Name of an existing field</li>
366- * <li>{@link Field}: References an existing document field.</li>
367- * <li>{@link Function}: Represents the result of a function with an assigned alias name using
368- * {@link Expr#as}</li>
369- * </ul>
365+ * - {@code string}: Name of an existing field
366+ * - {@link Field}: References an existing document field.
367+ * - {@link ExprWithAlias}: Represents the result of a function with an assigned alias name
368+ * using {@link Expr#as}.
370369 *
371- * <p> Example:
370+ * Example:
372371 *
373372 * ```typescript
374373 * // Get a list of unique author names in uppercase and genre combinations.
@@ -377,8 +376,8 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
377376 * .select("authorName");
378377 * ```
379378 *
380- * @param group The first {@link Selectable} expression to consider when determining distinct
381- * value combinations or strings representing field names .
379+ * @param group The {@link Selectable} expression or field name to consider when determining
380+ * distinct value combinations.
382381 * @param additionalGroups Optional additional {@link Selectable} expressions to consider when determining distinct
383382 * value combinations or strings representing field names.
384383 * @return A new {@code Pipeline} object with this stage appended to the stage list.
@@ -416,9 +415,9 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
416415 * ```
417416 *
418417 * @param accumulator The first {@link AggregateWithAlias}, wrapping an {@link AggregateFunction}
419- * and provide a name for the accumulated results.
418+ * and providing a name for the accumulated results.
420419 * @param additionalAccumulators Optional additional {@link AggregateWithAlias}, each wrapping an {@link AggregateFunction}
421- * and provide a name for the accumulated results.
420+ * and providing a name for the accumulated results.
422421 * @return A new Pipeline object with this stage appended to the stage list.
423422 */
424423 aggregate (
@@ -734,11 +733,10 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
734733 }
735734
736735 /**
737- * Produces a document for each element in array found in previous stage document .
736+ * Produces a document for each element in an input array .
738737 *
739738 * For each previous stage document, this stage will emit zero or more augmented documents. The
740- * input array found in the previous stage document field specified by the `selectable` parameter,
741- * will emit an augmented document for each input array element. The input array element will
739+ * input array specified by the `selectable` parameter, will emit an augmented document for each input array element. The input array element will
742740 * augment the previous stage document by setting the `alias` field with the array element value.
743741 *
744742 * When `selectable` evaluates to a non-array value (ex: number, null, absent), then the stage becomes a no-op for
0 commit comments