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
//! [`Grain`] — WHAT a retrieve collapses to, asked at the query rather than declared.
/// The grain a retrieve's dedup collapses at.
///
/// # The axis split it belongs to
///
/// `dedup(hash|eq)` stays DECLARED because it is a bounds choice on the key type — a property of the
/// declaration's own types, which only the declaration knows. The grain is result SHAPING, which
/// only the caller knows: the same index answers *find me the moments* and *find me the videos*
/// depending on what the client is drawing. 声明管界, 查询管形 — the declaration governs the bounds,
/// the query governs the shape.
///
/// # `Root` widens what collapses; it never changes what comes back
///
/// The return type is the same under both, and the surviving items are the node's OWN keys under
/// both. What `Root` changes is which LATECOMERS are dropped: a second hit whose root has already
/// been seen collapses into the first instead of standing beside it. Since the engine's stream is
/// score-descending and first-seen wins, the survivor is the BEST segment of that root — which is
/// the *search videos, show the moment that matched* result with no second query and no second type.
///
/// # A non-lineage node does not get this parameter at all
///
/// The root projection is the key's own root-first prefix, so a node whose key has no ancestry has
/// no prefix to project to, and its emitted face simply has no grain argument. That is compile-time
/// shaping by the emission rather than a runtime refusal — there is no `Grain::Root` call on such a
/// node to refuse.