Package com.mongodb.client.model
Interface ScoreFusionOptions
- All Superinterfaces:
Bson
Represents optional fields of the $scoreFusion pipeline stage of an aggregation pipeline.
- Since:
- 5.10
- MongoDB documentation
- $scoreFusion
- Since server release
- 8.2
-
Field Summary
Fields inherited from interface org.bson.conversions.Bson
DEFAULT_CODEC_REGISTRY -
Method Summary
Modifier and TypeMethodDescriptioncombination(ScoreFusionCombination combination) Creates a newScoreFusionOptionswith the combination specified.Creates a newScoreFusionOptionswith the specified option in situations when there is no builder method that better satisfies your needs.scoreDetails(boolean scoreDetails) Creates a newScoreFusionOptionswith the scoreDetails flag specified.static ScoreFusionOptionsReturnsScoreFusionOptionsthat represents server defaults.Methods inherited from interface org.bson.conversions.Bson
toBsonDocument, toBsonDocument
-
Method Details
-
scoreFusionOptions
ReturnsScoreFusionOptionsthat represents server defaults.- Returns:
ScoreFusionOptionsthat represents server defaults.
-
combination
Creates a newScoreFusionOptionswith the combination specified. If not specified, the server combines the normalized scores using its default method.- Parameters:
combination- The way in which the normalized scores are combined.- Returns:
- A new
ScoreFusionOptions.
-
scoreDetails
Creates a newScoreFusionOptionswith the scoreDetails flag specified. Whentrue, the server exposes score details via the{$meta: "scoreDetails"}expression. Server default isfalse.- Parameters:
scoreDetails- Whether to include score details.- Returns:
- A new
ScoreFusionOptions.
-
option
Creates a newScoreFusionOptionswith the specified option in situations when there is no builder method that better satisfies your needs. This method cannot be used to validate the syntax.- Parameters:
name- The option name.value- The option value.- Returns:
- A new
ScoreFusionOptions.
-