Table of Contents

Method ScoreFusion

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

ScoreFusion<TInput, TOutput>(Dictionary<string, PipelineDefinition<TInput, TOutput>>, ScoreFusionNormalization, Dictionary<string, double>, ScoreFusionOptions<TOutput>)

Creates a $scoreFusion stage.

public static PipelineStageDefinition<TInput, TOutput> ScoreFusion<TInput, TOutput>(Dictionary<string, PipelineDefinition<TInput, TOutput>> pipelines, ScoreFusionNormalization normalization, Dictionary<string, double> weights = null, ScoreFusionOptions<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.

normalization ScoreFusionNormalization

The normalization applied to per-pipeline scores before combination.

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

The scoreFusion options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.

ScoreFusion<TInput, TOutput>(PipelineDefinition<TInput, TOutput>[], ScoreFusionNormalization, ScoreFusionOptions<TOutput>)

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

public static PipelineStageDefinition<TInput, TOutput> ScoreFusion<TInput, TOutput>(PipelineDefinition<TInput, TOutput>[] pipelines, ScoreFusionNormalization normalization, ScoreFusionOptions<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.

normalization ScoreFusionNormalization

The normalization applied to per-pipeline scores before combination.

options ScoreFusionOptions<TOutput>

The scoreFusion options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.

ScoreFusion<TInput, TOutput>((PipelineDefinition<TInput, TOutput> Pipeline, double? Weight)[], ScoreFusionNormalization, ScoreFusionOptions<TOutput>)

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

public static PipelineStageDefinition<TInput, TOutput> ScoreFusion<TInput, TOutput>((PipelineDefinition<TInput, TOutput> Pipeline, double? Weight)[] pipelinesWithWeights, ScoreFusionNormalization normalization, ScoreFusionOptions<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.

normalization ScoreFusionNormalization

The normalization applied to per-pipeline scores before combination.

options ScoreFusionOptions<TOutput>

The scoreFusion options.

Returns

PipelineStageDefinition<TInput, TOutput>

The stage.

Type Parameters

TInput

The type of the input documents.

TOutput

The type of the output documents.