1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//! FUSION — what happens when ONE query is asked of N indexes and N ranked lists come back.
//!
//! ```text
//! member₁ floor → dedup → rank ─┐
//! member₂ floor → dedup → rank ─┼─ root-projected ─→ fuse ─→ Vec<Fused<Root, Evidence>>
//! member₃ floor → dedup → rank ─┘
//! ```
//!
//! Everything left of `fuse` is [`retrieve`](super)'s, once per member. This module is the join, and
//! it is the whole of the seventh query kind that does not depend on which engines are in the
//! catalog.
//!
//! # Ranks fuse; SCORES DO NOT
//!
//! The one fact the rest of the module follows from. A BM25 relevance is corpus-relative and
//! unbounded above, a cosine similarity is absolute in `[-1, 1]`, a quantised backend answers in
//! something else again — and two full-text slots holding different corpora do not even agree with
//! each other, because their document frequencies differ. So there is no arithmetic over the scores
//! of two members that means anything, and the ruling refuses the score-additive fusion families BY
//! NAME rather than shipping one behind a warning.
//!
//! What DOES cross is the ORDINAL. Reciprocal rank fusion reads only where each member put a thing,
//! never what it measured, so it is defined over exactly the members this framework can have — open
//! ones, whose currencies it has never seen.
//!
//! # The ordinal it reads is the ENGINE's, holes included
//!
//! `1 / (k + rank)` is computed against [`Ranked::rank`](crate::Ranked::rank) — the hit's position in
//! the engine's RAW stream — and not against its position in the survivor list. The two disagree
//! wherever the floor, the dedup or a filter dropped a hit, and the ruling names the engine's:
//! *survivors wearing their ENGINE ordinals (the ruled rank feeding the ruled fusion)*.
//!
//! It is the sharper reading as well as the ruled one. A member that returned three survivors out of
//! a hundred hits agrees less strongly about its third than a member that returned three out of
//! three, and only the raw ordinal can tell the two apart — re-densifying would make them identical.
//!
//! # The FUSION TREE, and where its two halves live
//!
//! Everything above is the FOLD — one tier's worth of arithmetic. The tree that fold runs over is
//! fractal: a tier's routes are its slots and its child tiers, each child fusing its own routes and
//! entering its parent as one. Three types carry that tree, and all three are here because none of
//! them is generic over an engine:
//!
//! - [`Fusable`] is the SEAM. A parent names no child package; it projects
//! `<Member as Fusable>::Options`, which is what lets a third-party member join with no edit to
//! the parent, and what makes a non-retrieving node's absence a compile fact.
//! - [`Route`] is the EDGE — the parent's own facts about one route (its weight in the fold, whether
//! it is walked, how deep to ask it) wrapped around the route's own package. [`route_depth`] is
//! the law that spends the third of those.
//! - [`FusionOptions`] is the per-tier ALGORITHM knob, the request whose one resolution is
//! [`Fusion`].
//!
//! The QUESTION side is the same tree again, and [`asked`] is its whole resolution law.
//!
//! # What is NOT here, and why
//!
//! The PACKAGES themselves — the leaf options a slot carries, the per-tier fuse package, the wire
//! SEMANTICS enum and the evidence enum — are EMISSIONS, minted at slot and tier grain by
//! declarations this crate has never seen. The doors that spend them are emissions too. What lives
//! here is the vocabulary all of that is written in: a seam, an edge, a flavour request, a fold, and
//! the two specs a caller fills in.
pub use ;
pub use ;
pub use ;
pub use Fusable;
pub use ;
pub use Fusion;
pub use Grain;
pub use ;
pub use ;
pub use AsyncFusedRead;
pub use ;
pub use FusedScore;
pub use Sighting;
pub use FloorSpec;