@@ -148,8 +148,8 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
148
148
* The added fields are defined using {@link Selectable}s, which can be:
149
149
*
150
150
* - {@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}.
153
153
*
154
154
* Example:
155
155
*
@@ -353,22 +353,21 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
353
353
return this . _addStage ( new Limit ( limit , convertedFromLimitToLast ) ) ;
354
354
}
355
355
356
+
356
357
/**
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.
358
359
*
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).
361
362
*
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 :
363
364
*
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}.
370
369
*
371
- * <p> Example:
370
+ * Example:
372
371
*
373
372
* ```typescript
374
373
* // Get a list of unique author names in uppercase and genre combinations.
@@ -377,8 +376,8 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
377
376
* .select("authorName");
378
377
* ```
379
378
*
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.
382
381
* @param additionalGroups Optional additional {@link Selectable} expressions to consider when determining distinct
383
382
* value combinations or strings representing field names.
384
383
* @return A new {@code Pipeline} object with this stage appended to the stage list.
@@ -416,9 +415,9 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
416
415
* ```
417
416
*
418
417
* @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.
420
419
* @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.
422
421
* @return A new Pipeline object with this stage appended to the stage list.
423
422
*/
424
423
aggregate (
@@ -734,11 +733,10 @@ export class Pipeline implements ProtoSerializable<ProtoPipeline> {
734
733
}
735
734
736
735
/**
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 .
738
737
*
739
738
* 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
742
740
* augment the previous stage document by setting the `alias` field with the array element value.
743
741
*
744
742
* When `selectable` evaluates to a non-array value (ex: number, null, absent), then the stage becomes a no-op for
0 commit comments