docssearch

package
v0.0.1-alpha.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package docssearch serves search over the published docs/ tree.

docs and postings (the tables searched below) are declared in index.gen.go, which is generated from docs/ and committed — this package cannot compile without it, and 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

type Posting

type Posting struct {
	Doc   int
	Score int
}

Posting records a precomputed relevance score for a term in a document.

type Result

type Result struct {
	Document
	Score int
}

Result is one ranked documentation search result.

func Search(query string, limit int) []Result

Search returns ranked documentation matches from the generated inverted index.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL