Skip to main content

Module search

Module search 

Source
Expand description

Fuzzy and substring search over transcripts (feature search).

Two entry points, sharing Query and Hit:

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; build Extracteds on worker threads and fold each into the index with Index::insert_extracted.
Hit
One matching line. highlights are character-index ranges into line, ready for highlighting.
Index
An in-memory search index over many transcripts.
Query
A search request. Build with Query::fuzzy or Query::substring, then adjust fields as needed; the same value drives both search and Index::query. Deserializes from as little as {"pattern": "…"} — every other field has the constructor’s default.

Enums§

Case
Case sensitivity. Case::Smart is 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 of Query::origins.

Functions§

search
Search a single transcript. Hits come back in transcript order, Query::limit capping their count.