2026-11-03 · Project search, first delivery

2026-11-03 · Project search, first delivery

Context

#86, the full-text search left from #57: a researcher with hundreds of newspaper articles or interviews in a project wants every passage that names an organisation or a person, without opening each document, and to go from a passage to its source. The review’s search (decision) already finds words in one document as the researcher reads it; project search covered only titles, file names and tags.

None of the three reference projects searches across results: iwac-ai-pipelines and zmo-ai-pipelines write files and leave searching to Omeka or the file system, and Live Translation keeps no corpus. The design is Kalamu’s own. iwac-ai-pipelines’ name folding (capitals, accents, punctuation) is already the dictionary’s; this search folds as the review does instead, since it must find a phrase where it stands.

A new crate and a new trait make this an architecture checkpoint (AGENTS.md). Its findings are at the end.

Decisions

Measured

A synthetic project of 500 documents, 4,000 pages and 12 MB of text (an ignored test, cargo test -p kalamu-search --release -- --ignored --nocapture scale), on the development machine while other builds ran: the first search, which prepares every page, took 3.6 to 5 s; a phrase then took 70 to 120 ms; a three-letter word on every page (43,586 matches, the first 1,000 listed) took 1.3 to 1.8 s, most of it folding each candidate page to place its matches. The index took 38 MB, about three times the text: the trigrams, and the text as shown kept beside them.

Left for later

All but alternatives were done the same day (decision).

Checkpoint

Consequences