Skip to main content

Module search

Module search 

Source
Expand description

Full-text search over what the served document publishes: the pages its nav reaches, and the chapters and slides of every document those reach, split at their headings into sections, in a tantivy index held in memory. Built at start beside the served folder’s document index and kept current by the watcher a page at a time, so a search never reads a file; or, over files that never change, built once and frozen, with no writer left.

tantivy, because it is a real full-text engine — BM25 ranking, stemming, phrases, near and prefix matches — as a library in pure Rust, with an index in memory: nothing to run beside devpage and nothing written to disk.

Structs§

Answer
A search’s answer: the pages found, best first, each with its best sections.
Owner
The document a page belongs to: its title and its document file’s address.
PageResult
One page found: where it is, what it is, and its sections that matched.
Search
The search index of what the served document publishes: what keeps it current, and the snapshot each search reads.
SectionResult
One section found: its heading, where it is, a snippet of its prose with the matched words in <mark>, and those words as its text spells them.

Enums§

PageKind
What a page found is: a site’s page, a doc’s chapter, or a deck’s slide.