Documentation
¶
Overview ¶
Package docssearch serves search over the published docs/ tree.
The corpus searched below is index.gen.jsonl, generated from docs/ and committed — this package embeds it, so a bare checkout has to build. After editing anything under docs/, regenerate with `make docs-index` (or `task docs-index`, or `go generate` here) and commit the result; CI fails on a stale index. See index.go for how it is loaded and why it is shaped that way.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Unavailable ¶
func Unavailable() error
Unavailable reports why the index cannot serve searches, or nil when it can. Callers serving the docs search endpoint must distinguish this from a query with no matches: an unreadable index would otherwise answer every query with an empty result set, which looks like a working search over an empty corpus. An index that parsed but holds no documents is one of the failures, not a third state — parseIndex reports it as an error.
Types ¶
type Document ¶
type Document struct {
ID int
Path string
Href string
Title string
Description string
Section string
Tags []string
}
Document is the metadata returned for a searchable documentation page.