Pipeline

A sequence of stages that transforms a set of documents; built from a PipelineSource and run with execute.

Types

Link copied to clipboard
Link copied to clipboard
class Snapshot(val executionTime: <Error class: unknown class>, val results: List<PipelineResult>) : Iterable<PipelineResult>

The results of an execution, in order.

Functions

Link copied to clipboard
fun addFields(field: Selectable, vararg additionalFields: Selectable): Pipeline
Link copied to clipboard
fun aggregate(aggregateStage: AggregateStage): Pipeline
fun aggregate(aggregateStage: AggregateStage, options: AggregateOptions): Pipeline
fun aggregate(accumulator: AliasedAggregate, vararg additionalAccumulators: AliasedAggregate): Pipeline
Link copied to clipboard
fun define(aliasedExpression: AliasedExpression, vararg additionalExpressions: AliasedExpression): Pipeline
Link copied to clipboard
fun distinct(group: Selectable, vararg additionalGroups: Any): Pipeline
fun distinct(groupField: String, vararg additionalGroups: Any): Pipeline
Link copied to clipboard
fun execute(): <Error class: unknown class><Pipeline.Snapshot>

Runs the pipeline and completes with its results.

fun execute(options: Pipeline.ExecuteOptions): <Error class: unknown class><Pipeline.Snapshot>

Runs the pipeline with options and completes with its results.

Link copied to clipboard
fun findNearest(vectorField: Field, vectorValue: DoubleArray, distanceMeasure: FindNearestStage.DistanceMeasure): Pipeline
fun findNearest(vectorField: String, vectorValue: DoubleArray, distanceMeasure: FindNearestStage.DistanceMeasure): Pipeline
fun findNearest(vectorField: String, vectorValue: Expression, distanceMeasure: FindNearestStage.DistanceMeasure, options: FindNearestOptions): Pipeline
Link copied to clipboard
fun limit(limit: Int): Pipeline
Link copied to clipboard
fun offset(offset: Int): Pipeline
Link copied to clipboard
fun rawStage(rawStage: RawStage): Pipeline
Link copied to clipboard
fun removeFields(field: Field, vararg additionalFields: Field): Pipeline
fun removeFields(field: String, vararg additionalFields: String): Pipeline
Link copied to clipboard
Link copied to clipboard
fun sample(documents: Int): Pipeline
Link copied to clipboard
fun search(searchStage: SearchStage): Pipeline
Link copied to clipboard
fun select(selection: Selectable, vararg additionalSelections: Any): Pipeline
fun select(fieldName: String, vararg additionalSelections: Any): Pipeline
Link copied to clipboard
fun sort(order: Ordering, vararg additionalOrders: Ordering): Pipeline
Link copied to clipboard

This pipeline's results as an array, for use in an enclosing pipeline's expression.

Link copied to clipboard

This pipeline's single result, for use in an enclosing pipeline's expression.

Link copied to clipboard
fun union(other: Pipeline): Pipeline
Link copied to clipboard
fun unnest(arrayWithAlias: Selectable): Pipeline
fun unnest(unnestStage: UnnestStage): Pipeline
fun unnest(arrayWithAlias: Selectable, options: UnnestOptions): Pipeline
fun unnest(arrayField: String, alias: String): Pipeline
Link copied to clipboard