Class PipelineDefinitionBuilder | MongoDB CSharp Driver API Reference (original ) (raw )
Namespace
MongoDB .Driver
Assembly
MongoDB.Driver.dll
Extension methods for adding stages to a pipeline.
public static class PipelineDefinitionBuilder
Inheritance
PipelineDefinitionBuilder
Inherited Members
MethodsAppendStage<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, PipelineStageDefinition<TIntermediate, TOutput>, IBsonSerializer)
Appends a stage to the pipeline.
As<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IBsonSerializer)
Changes the output type of the pipeline.
BucketAuto<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
BucketAuto<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, int, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
BucketAuto<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, int, ProjectionDefinition<TIntermediate, TOutput>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline.
BucketAuto<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, int, Expression<Func<IGrouping<AggregateBucketAutoResultId, TIntermediate>, TOutput>>, AggregateBucketAutoOptions)
Appends a $bucketAuto stage to the pipeline (this overload can only be used with LINQ3).
Bucket<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, IEnumerable, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
Bucket<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, IEnumerable, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
Bucket<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>, IEnumerable, ProjectionDefinition<TIntermediate, TOutput>, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
Bucket<TInput, TIntermediate, TValue, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>, IEnumerable, Expression<Func<IGrouping<TValue, TIntermediate>, TOutput>>, AggregateBucketOptions)
Appends a $bucket stage to the pipeline.
ChangeStreamSplitLargeEvent(PipelineDefinition<ChangeStreamDocument, ChangeStreamDocument>)
Appends a $changeStreamSplitLargeEvent stage.
ChangeStream<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, ChangeStreamStageOptions)
Appends a $changeStream stage to the pipeline. Normally you would prefer to use the Watch method of IMongoCollection . Only use this method if subsequent stages project away the resume token (the _id) or you don't want the resulting cursor to automatically resume.
Count<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>)
Appends a $count stage to the pipeline.
Densify<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, FieldDefinition, DensifyRange, params FieldDefinition[])
Appends a $densify stage to the pipeline.
Densify<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, FieldDefinition, DensifyRange, IEnumerable<FieldDefinition>)
Appends a $densify stage to the pipeline.
Densify<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, object>>, DensifyRange, IEnumerable<Expression<Func<TOutput, object>>>)
Appends a $densify stage to the pipeline.
Densify<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, object>>, DensifyRange, params Expression<Func<TOutput, object>>[])
Appends a $densify stage to the pipeline.
Documents(PipelineDefinition<NoPipelineInput, NoPipelineInput>, AggregateExpressionDefinition<NoPipelineInput, IEnumerable>, IBsonSerializer)
Appends a $documents stage to the pipeline.
Documents(PipelineDefinition<NoPipelineInput, NoPipelineInput>, IEnumerable, IBsonSerializer)
Appends a $documents stage to the pipeline.
Facet<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, params AggregateFacet[])
Appends a $facet stage to the pipeline.
Facet<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, IEnumerable<AggregateFacet>)
Appends a $facet stage to the pipeline.
Facet<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, params AggregateFacet[])
Appends a $facet stage to the pipeline.
Facet<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IEnumerable<AggregateFacet>, AggregateFacetOptions)
Appends a $facet stage to the pipeline.
For(IBsonSerializer)
Used to start creating a pipeline for {TInput} documents.
GeoNear<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, double[], GeoNearOptions<TIntermediate, TOutput>)
Appends a $geoNear stage to the pipeline.
GeoNear<TInput, TIntermediate, TCoordinates, TOutput>(PipelineDefinition<TInput, TIntermediate>, GeoJsonPoint, GeoNearOptions<TIntermediate, TOutput>)
Appends a $geoNear stage to the pipeline.
GraphLookup<TInput, TIntermediate, TFrom>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, FieldDefinition<TFrom, BsonValue>, FieldDefinition<TFrom, BsonValue>, AggregateExpressionDefinition<TIntermediate, BsonValue>, FieldDefinition<BsonDocument, IEnumerable>, FieldDefinition<BsonDocument, int>)
Appends a $graphLookup stage to the pipeline.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TIntermediate, TStartWith>, FieldDefinition<TOutput, TAs>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>)
Appends a $graphLookup stage to the pipeline.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TIntermediate, TStartWith>>, Expression<Func<TOutput, TAs>>, AggregateGraphLookupOptions<TFrom, TFrom, TOutput>)
Appends a $graphLookup stage to the pipeline.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, FieldDefinition<TFrom, TConnectFrom>, FieldDefinition<TFrom, TConnectTo>, AggregateExpressionDefinition<TIntermediate, TStartWith>, FieldDefinition<TOutput, TAs>, FieldDefinition<TAsElement, int>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>)
Appends a $graphLookup stage to the pipeline.
GraphLookup<TInput, TIntermediate, TFrom, TConnectFrom, TConnectTo, TStartWith, TAsElement, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, Expression<Func<TFrom, TConnectFrom>>, Expression<Func<TFrom, TConnectTo>>, Expression<Func<TIntermediate, TStartWith>>, Expression<Func<TOutput, TAs>>, Expression<Func<TAsElement, int>>, AggregateGraphLookupOptions<TFrom, TAsElement, TOutput>)
Appends a $graphLookup stage to the pipeline.
Group<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, ProjectionDefinition<TIntermediate, BsonDocument>)
Appends a group stage to the pipeline.
Group<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, ProjectionDefinition<TIntermediate, TOutput>)
Appends a $group stage to the pipeline.
Group<TInput, TIntermediate, TKey, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TKey>>, Expression<Func<IGrouping<TKey, TIntermediate>, TOutput>>)
Appends a group stage to the pipeline.
Limit<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, long)
Appends a $limit stage to the pipeline.
Lookup<TInput, TIntermediate, TForeignDocument, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, FieldDefinition, FieldDefinition, FieldDefinition, AggregateLookupOptions<TForeignDocument, TOutput>)
Appends a $lookup stage to the pipeline.
Lookup<TInput, TIntermediate, TForeignDocument, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, Expression<Func<TIntermediate, object>>, Expression<Func<TForeignDocument, object>>, Expression<Func<TOutput, object>>, AggregateLookupOptions<TForeignDocument, TOutput>)
Appends a lookup stage to the pipeline.
Lookup<TInput, TIntermediate, TForeignDocument, TAsElement, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, FieldDefinition<TOutput, TAs>, AggregateLookupOptions<TForeignDocument, TOutput>)
Appends a $lookup stage to the pipeline.
Lookup<TInput, TIntermediate, TForeignDocument, TAsElement, TAs, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, BsonDocument, PipelineDefinition<TForeignDocument, TAsElement>, Expression<Func<TOutput, TAs>>, AggregateLookupOptions<TForeignDocument, TOutput>)
Appends a $lookup stage to the pipeline.
Match<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, FilterDefinition)
Appends a $match stage to the pipeline.
Match<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, bool>>)
Appends a match stage to the pipeline.
Merge<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IMongoCollection, MergeStageOptions)
Appends a $merge stage to the pipeline.
OfType<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, IBsonSerializer)
Appends a $match stage to the pipeline to select documents of a certain type.
Out<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, IMongoCollection, TimeSeriesOptions)
Appends a $out stage to the pipeline.
Project<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, ProjectionDefinition<TIntermediate, BsonDocument>)
Appends a project stage to the pipeline.
Project<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, ProjectionDefinition<TIntermediate, TOutput>)
Appends a $project stage to the pipeline.
Project<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TOutput>>)
Appends a project stage to the pipeline.
RankFusion<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, PipelineDefinition<TIntermediate, TOutput>[], RankFusionOptions)
Appends a $rankFusion stage to the pipeline. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.
RankFusion<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Dictionary<string, PipelineDefinition<TIntermediate, TOutput>>, Dictionary<string, double>, RankFusionOptions)
Appends a $rankFusion stage to the pipeline.
RankFusion<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, (PipelineDefinition<TIntermediate, TOutput>, double?)[], RankFusionOptions)
Appends a $rankFusion stage to the pipeline. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.
ReplaceRoot<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TOutput>)
Appends a $replaceRoot stage to the pipeline.
ReplaceRoot<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TOutput>>)
Appends a $replaceRoot stage to the pipeline.
ReplaceWith<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TOutput>)
Appends a $replaceWith stage to the pipeline.
ReplaceWith<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TOutput>>)
Appends a $replaceWith stage to the pipeline.
Sample<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, long)
Appends a $sample stage to the pipeline.
SearchMeta<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SearchDefinition, string, SearchCountOptions)
Appends a $searchMeta stage to the pipeline.
Search<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SearchDefinition, SearchHighlightOptions, string, SearchCountOptions, bool, bool)
Appends a $search stage to the pipeline.
Search<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SearchDefinition, SearchOptions)
Appends a $search stage to the pipeline.
SetWindowFields<TInput, TIntermediate, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)
Create a $setWindowFields stage.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TPartitionBy>, AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)
Appends a $setWindowFields stage to the pipeline.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TPartitionBy>, SortDefinition, AggregateExpressionDefinition<ISetWindowFieldsPartition, TWindowFields>)
Appends a $setWindowFields stage to the pipeline.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<ISetWindowFieldsPartition, TWindowFields>>)
Appends a $setWindowFields stage to the pipeline.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TPartitionBy>>, SortDefinition, Expression<Func<ISetWindowFieldsPartition, TWindowFields>>)
Appends a $setWindowFields stage to the pipeline.
SetWindowFields<TInput, TIntermediate, TPartitionBy, TWindowFields>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TPartitionBy>>, Expression<Func<ISetWindowFieldsPartition, TWindowFields>>)
Appends a $setWindowFields stage to the pipeline.
Set<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SetFieldDefinitions)
Appends a $set stage to the pipeline.
Set<TInput, TOutput, TFields>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, TFields>>)
Appends a $set stage to the pipeline.
Skip<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, long)
Appends a $skip stage to the pipeline.
SortByCount<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, AggregateExpressionDefinition<TIntermediate, TValue>)
Appends a $sortByCount stage to the pipeline.
SortByCount<TInput, TIntermediate, TValue>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, TValue>>)
Appends a sortByCount stage to the pipeline.
Sort<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, SortDefinition)
Appends a $sort stage to the pipeline.
UnionWith<TInput, TWith, TOutput>(PipelineDefinition<TInput, TOutput>, IMongoCollection, PipelineDefinition<TWith, TOutput>)
Appends a $unionWith stage to the pipeline.
Unwind<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, FieldDefinition, AggregateUnwindOptions)
Appends an unwind stage to the pipeline.
Unwind<TInput, TIntermediate>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, object>>, AggregateUnwindOptions)
Appends an unwind stage to the pipeline.
Unwind<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, FieldDefinition, AggregateUnwindOptions)
Appends an $unwind stage to the pipeline.
Unwind<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Expression<Func<TIntermediate, object>>, AggregateUnwindOptions)
Appends an unwind stage to the pipeline.
VectorSearch<TInput, TOutput>(PipelineDefinition<TInput, TOutput>, FieldDefinition, QueryVector, int, VectorSearchOptions)
Appends a $vectorSearch stage to the pipeline.
VectorSearch<TInput, TField, TOutput>(PipelineDefinition<TInput, TOutput>, Expression<Func<TOutput, TField>>, QueryVector, int, VectorSearchOptions)
Appends a $vectorSearch stage to the pipeline.