Member Junction
    Preparing search index...

    Handles fusion and deduplication of multi-source search results using Reciprocal Rank Fusion.

    Index

    Constructors

    Methods

    • Fuse already-per-scope-fused result lists into a single cross-scope ranking.

      Each entry in scopeResults is a per-scope ranked list (already internally fused across its providers via Fuse()). Cross-scope RRF treats each scope's ranking as one input list to a new RRF computation, so records that appear in multiple scopes get boosted.

      Parameters

      • scopeResults: Map<string, SearchResultItem[]>

        Map of scopeID → per-scope results.

      • maxResults: number

        Maximum number of results to return.

      • OptionalfusionWeights: Record<string, number>

        Optional per-scope weights keyed by scope ID. Missing keys default to 1.0.

      Returns SearchResultItem[]

      Fused, cross-scope-ranked results (not yet deduplicated).

    • Fuse multiple ranked result lists using RRF, deduplicate, and return the top results up to maxResults.

      When only one source has results, scores are normalized relative to the top result so the best match appears at ~95% rather than raw cosine similarity (~40-50%).

      Parameters

      • lists: LabeledResultList[]

        Labeled result lists from each search source

      • maxResults: number

        Maximum number of results to return

      • OptionalfusionWeights: FusionWeightsByProvider

        Optional per-provider weights applied during RRF. Keys match SearchSource values (plus any custom source types). Missing keys default to 1.0. Only applied when there are 2+ sources.

      Returns SearchResultItem[]

      Fused, deduplicated, and ranked results