Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FusionResult ¶
type FusionResult struct {
Hits search.DocumentMatchCollection
Total uint64
MaxScore float64
}
func ReciprocalRankFusion ¶
func ReciprocalRankFusion(hits search.DocumentMatchCollection, weights []float64, rankConstant int, windowSize int, numKNNQueries int, explain bool) *FusionResult
ReciprocalRankFusion applies Reciprocal Rank Fusion across the primary FTS results and each KNN sub-query. Ranks are limited to `windowSize` per source, weighted, and combined into a single fused score, with optional explanation details.
func RelativeScoreFusion ¶
func RelativeScoreFusion(hits search.DocumentMatchCollection, weights []float64, windowSize int, numKNNQueries int, explain bool) *FusionResult
RelativeScoreFusion normalizes the best-scoring documents from the primary FTS query and each KNN query, scales those normalized values by the supplied weights, and combines them into a single fused score. Only the top `windowSize` documents per source are considered, and explanations are materialized lazily when requested.
Click to show internal directories.
Click to hide internal directories.