Table of Contents

Method RankFusion

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

RankFusion<TInput, TOutput>(Dictionary<string, PipelineDefinition<TInput, TOutput>>, Dictionary<string, double>, RankFusionOptions<TOutput>)

Creates a $rankFusion stage.

public static PipelineStageDefinition<TInput, TOutput> RankFusion<TInput, TOutput>(Dictionary<string, PipelineDefinition<TInput, TOutput>> pipelines, Dictionary<string, double> weights = null, RankFusionOptions<TOutput> options = null)

Parameters

pipelines Dictionary<string, PipelineDefinition<TInput, TOutput>>

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<TOutput>

The rankFusion options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.

RankFusion<TInput, TOutput>(PipelineDefinition<TInput, TOutput>[], RankFusionOptions<TOutput>)

Creates a $rankFusion stage. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.

public static PipelineStageDefinition<TInput, TOutput> RankFusion<TInput, TOutput>(PipelineDefinition<TInput, TOutput>[] pipelines, RankFusionOptions<TOutput> options = null)

Parameters

pipelines PipelineDefinition<TInput, TOutput>[]

The collection of pipelines whose results will be combined. The pipelines must operate on the same collection.

options RankFusionOptions<TOutput>

The rankFusion options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.

RankFusion<TInput, TOutput>((PipelineDefinition<TInput, TOutput> Pipeline, double? Weight)[], RankFusionOptions<TOutput>)

Creates a $rankFusion stage. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.

public static PipelineStageDefinition<TInput, TOutput> RankFusion<TInput, TOutput>((PipelineDefinition<TInput, TOutput> Pipeline, double? Weight)[] pipelinesWithWeights, RankFusionOptions<TOutput> options = null)

Parameters

pipelinesWithWeights (PipelineDefinition<TInput, TOutput> Pipeline, double? Weight)[]

The collection of tuples containing (pipeline, weight) pairs. The pipelines must operate on the same collection.

options RankFusionOptions<TOutput>

The rankFusion options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.