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
use *;
/// Widens the discussion-density signal, and makes `require_all` satisfiable.
///
/// `context_matches` was a +-30 s window. On the sample that nearly did not
/// discriminate: each video's window peaked at 2 while some videos had 18
/// matching cues, so 119 of 165 rows for `dark root basin` scored 1 and the
/// tie-break above `rank` was close to arbitrary. At +-300 s the tail appears -
/// a handful of passages carry eight or more mentions in ten minutes - which is
/// what "this segment is about the term" looks like in this corpus. Thirty
/// seconds was measuring whether the speaker repeated the word in one breath,
/// a thing the utterance merge in f5aa277 had already removed from storage.
///
/// `require_all` demanded every term in the same cue, so `dark root basin`
/// returned nothing - not because no video says those words, but because no
/// sixteen-word utterance holds all three at once. It is now satisfied by the
/// video's deduplicated body, where the terms can actually co-occur, while the
/// cue scan stays any-term so a video that discusses the phrase returns its
/// cues with `matched_terms` naming how much of it each one carries.
///
/// An earlier draft fell back to any-term when nothing satisfied the strict
/// query and was removed: silently returning the whole loose set is the failure
/// the flag exists to prevent. `total = 0` is predictable, whereas a total that
/// means something else depending on whether the phrase exists is not.
///
/// Both functions resolve the scan through `transcript_scan_query`, because a
/// page and its total disagreeing about which query ran is a defect that would
/// surface exactly when a caller trusts the total most.
///
/// `search_video_transcript` is added for the "5 more matches in this video"
/// interaction. The `video_id` filter on the main endpoint already lists a
/// video's matching cues; this adds the one thing it cannot, a sequential
/// `moment` number, so a client can group the rolling repeats around one
/// mention without recomputing the gap itself.
;
const UP: &str = include_str!;