Method RankFusion
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
RankFusion<TResult, TNewResult>(IAggregateFluent, Dictionary<string, PipelineDefinition<TResult, TNewResult>>, Dictionary<string, double>, RankFusionOptions)
Appends a $rankFusion stage to the pipeline.
public static IAggregateFluent<TNewResult> RankFusion<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, Dictionary<string, PipelineDefinition<TResult, TNewResult>> pipelines, Dictionary<string, double> weights = null, RankFusionOptions<TNewResult> options = null)Parameters
aggregate IAggregateFluent
The aggregate.
pipelines Dictionary<string, PipelineDefinition<TResult, TNewResult>>
The map of named pipelines whose results will be combined. The pipelines must operate on the same collection.
weights Dictionary<string, double>
The map of pipeline names to non-negative numerical weights determining result importance during combination. Default weight is 1 when unspecified.
options RankFusionOptions
The rankFusion options.
Returns
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.
RankFusion<TResult, TNewResult>(IAggregateFluent, PipelineDefinition<TResult, TNewResult>[], RankFusionOptions)
Appends a $rankFusion stage to the pipeline. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.
public static IAggregateFluent<TNewResult> RankFusion<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, PipelineDefinition<TResult, TNewResult>[] pipelines, RankFusionOptions<TNewResult> options = null)Parameters
aggregate IAggregateFluent
The aggregate.
pipelines PipelineDefinition<TResult, TNewResult>[]
The collection of pipelines whose results will be combined. The pipelines must operate on the same collection.
options RankFusionOptions
The rankFusion options.
Returns
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.
RankFusion<TResult, TNewResult>(IAggregateFluent, (PipelineDefinition<TResult, TNewResult>, double?)[], RankFusionOptions)
Appends a $rankFusion stage to the pipeline. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.
public static IAggregateFluent<TNewResult> RankFusion<TResult, TNewResult>(this IAggregateFluent<TResult> aggregate, (PipelineDefinition<TResult, TNewResult>, double?)[] pipelinesWithWeights, RankFusionOptions<TNewResult> options = null)Parameters
aggregate IAggregateFluent
The aggregate.
pipelinesWithWeights (PipelineDefinition<TResult, TNewResult>, double?)[]
The collection of tuples containing (pipeline, weight) pairs. The pipelines must operate on the same collection.
options RankFusionOptions
The rankFusion options.
Returns
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.