Expand description
Fuzzy and substring search over transcripts (feature search).
Two entry points, sharing Query and Hit:
search— one-shot, stateless: the matching lines of a singleTranscript<Common>.Index—Index::inserttranscripts once, thenIndex::queryper keystroke. Text is extracted and pre-converted to UTF-32 at insert; queries scan without parsing or transcoding.
Matching is nucleo, helix’s
matcher, with smart case and Latin diacritic folding. Mode::Fuzzy
accepts the full fzf-style pattern language (foo bar all-of, 'exact,
^prefix, suffix$, !not); Mode::Substring treats the pattern as
one literal needle. Ranking adds a literal-occurrence tier above gapped
fuzzy matches; nucleo scoring orders lines within each tier.
Structs§
- DocKey
- Identity of an indexed document: which harness’s session it is.
- DocMatch
- One document’s result from
Index::query: the session, its best-hit score, and its matching lines in transcript order. - Extracted
- One transcript’s searchable content, extracted outside the index — the
caller-parallelizable half of
Index::insert. Extraction (line splitting, UTF-32 transcoding) is the expensive part of an insert; buildExtracteds on worker threads and fold each into the index withIndex::insert_extracted. - Hit
- One matching line.
highlightsare character-index ranges intoline, ready for highlighting. - Index
- An in-memory search index over many transcripts.
- Query
- A search request. Build with
Query::fuzzyorQuery::substring, then adjust fields as needed; the same value drives bothsearchandIndex::query. Deserializes from as little as{"pattern": "…"}— every other field has the constructor’s default.
Enums§
- Case
- Case sensitivity.
Case::Smartis case-insensitive until the pattern contains an uppercase character (vim smartcase). - Mode
- How the pattern matches.
- Origin
- What kind of content a line came from — the “what am I looking at” label
on every
Hit, and the filter axis ofQuery::origins.
Functions§
- search
- Search a single transcript. Hits come back in transcript order,
Query::limitcapping their count.