Method RankFusion
RankFusion<TResult, TNewResult>(IAggregateFluent<TResult>, Dictionary<string, PipelineDefinition<TResult, TNewResult>>, Dictionary<string, double>, RankFusionOptions<TNewResult>)
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<TResult>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<TNewResult>The rankFusion options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.
RankFusion<TResult, TNewResult>(IAggregateFluent<TResult>, PipelineDefinition<TResult, TNewResult>[], RankFusionOptions<TNewResult>)
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<TResult>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<TNewResult>The rankFusion options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.
RankFusion<TResult, TNewResult>(IAggregateFluent<TResult>, (PipelineDefinition<TResult, TNewResult>, double?)[], RankFusionOptions<TNewResult>)
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<TResult>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<TNewResult>The rankFusion options.
Returns
- IAggregateFluent<TNewResult>
The fluent aggregate interface.
Type Parameters
TResult
The type of the result.
TNewResult
The type of the new result.