Method ScoreFusion
ScoreFusion<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, Dictionary<string, PipelineDefinition<TIntermediate, TOutput>>, ScoreFusionNormalization, Dictionary<string, double>, ScoreFusionOptions<TOutput>)
Appends a $scoreFusion stage to the pipeline.
public static PipelineDefinition<TInput, TOutput> ScoreFusion<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, Dictionary<string, PipelineDefinition<TIntermediate, TOutput>> pipelines, ScoreFusionNormalization normalization, Dictionary<string, double> weights = null, ScoreFusionOptions<TOutput> options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
pipelinesDictionary<string, PipelineDefinition<TIntermediate, TOutput>>The map of named pipelines whose results will be combined. The pipelines must operate on the same collection.
normalizationScoreFusionNormalizationThe normalization applied to per-pipeline scores before combination.
weightsDictionary<string, double>The map of pipeline names to non-negative numerical weights determining result importance during combination. Default weight is 1 when unspecified.
optionsScoreFusionOptions<TOutput>The scoreFusion options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the documents.
TIntermediateThe type of the intermediate documents.
TOutputThe type of the output documents.
ScoreFusion<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, PipelineDefinition<TIntermediate, TOutput>[], ScoreFusionNormalization, ScoreFusionOptions<TOutput>)
Appends a $scoreFusion stage to the pipeline. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.
public static PipelineDefinition<TInput, TOutput> ScoreFusion<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, PipelineDefinition<TIntermediate, TOutput>[] pipelines, ScoreFusionNormalization normalization, ScoreFusionOptions<TOutput> options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
pipelinesPipelineDefinition<TIntermediate, TOutput>[]The collection of pipelines whose results will be combined. The pipelines must operate on the same collection.
normalizationScoreFusionNormalizationThe normalization applied to per-pipeline scores before combination.
optionsScoreFusionOptions<TOutput>The scoreFusion options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the documents.
TIntermediateThe type of the intermediate documents.
TOutputThe type of the output documents.
ScoreFusion<TInput, TIntermediate, TOutput>(PipelineDefinition<TInput, TIntermediate>, (PipelineDefinition<TIntermediate, TOutput>, double?)[], ScoreFusionNormalization, ScoreFusionOptions<TOutput>)
Appends a $scoreFusion stage to the pipeline. Pipelines will be automatically named as "pipeline1", "pipeline2", etc.
public static PipelineDefinition<TInput, TOutput> ScoreFusion<TInput, TIntermediate, TOutput>(this PipelineDefinition<TInput, TIntermediate> pipeline, (PipelineDefinition<TIntermediate, TOutput>, double?)[] pipelinesWithWeights, ScoreFusionNormalization normalization, ScoreFusionOptions<TOutput> options = null)
Parameters
pipelinePipelineDefinition<TInput, TIntermediate>The pipeline.
pipelinesWithWeights(PipelineDefinition<TIntermediate, TOutput>, double?)[]The collection of tuples containing (pipeline, weight) pairs. The pipelines must operate on the same collection.
normalizationScoreFusionNormalizationThe normalization applied to per-pipeline scores before combination.
optionsScoreFusionOptions<TOutput>The scoreFusion options.
Returns
- PipelineDefinition<TInput, TOutput>
A new pipeline with an additional stage.
Type Parameters
TInputThe type of the documents.
TIntermediateThe type of the intermediate documents.
TOutputThe type of the output documents.