Package com.mongodb.client.model
Interface ScoreFusionCombination
- All Superinterfaces:
Bson
- All Known Subinterfaces:
WeightedScoreFusionCombination
The way in which the normalized scores produced by the input pipelines of the
$scoreFusion
stage are combined into the final score. The server rejects specifying both
weights and an expression,
which is why they are separate factory methods.
- Since:
- 5.10
- See Also:
- MongoDB documentation
- $scoreFusion
- Since server release
- 8.2
-
Field Summary
Fields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic ScoreFusionCombinationexpression(Bson expression) Returns aScoreFusionCombinationcombining the scores using a custom expression.Returns aWeightedScoreFusionCombinationcombining the scores using per-pipeline weights.Methods inherited from interface org.bson.conversions.Bson
toBsonDocument, toBsonDocument
-
Method Details
-
weighted
Returns aWeightedScoreFusionCombinationcombining the scores using per-pipeline weights.- Parameters:
weights- A document mapping pipeline names to non-negative numeric weights. Pipelines not mentioned have the server-default weight 1.- Returns:
- The requested
WeightedScoreFusionCombination.
-
expression
Returns aScoreFusionCombinationcombining the scores using a custom expression. The normalized, weighted score of each input pipeline is available to the expression as the variable named after the pipeline, e.g.,"$$name".- Parameters:
expression- The combination expression.- Returns:
- The requested
ScoreFusionCombination.
-