docsearch

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DocChunk

type DocChunk struct {
	ID      string // e.g., "workflows/session-start"
	Topic   string // e.g., "workflows"
	Heading string // e.g., "Session Start Checklist"
	Content string // full text for indexing
	Preview string // first ~200 chars for display
}

DocChunk represents a searchable section of documentation.

func ChunkAllDocs

func ChunkAllDocs() []DocChunk

ChunkAllDocs splits all embedded documentation into searchable chunks.

func ChunkMarkdown

func ChunkMarkdown(topic, content string) []DocChunk

ChunkMarkdown splits a markdown document into chunks by headers.

type SearchResult

type SearchResult struct {
	Chunk DocChunk
	Score float64
}

SearchResult represents a search hit with score.

type Searcher

type Searcher struct {
	// contains filtered or unexported fields
}

Searcher provides full-text search over documentation.

func NewSearcher

func NewSearcher(chunks []DocChunk) (*Searcher, error)

NewSearcher creates a new searcher with an in-memory Bleve index.

func (*Searcher) Close

func (s *Searcher) Close() error

Close releases resources held by the searcher.

func (*Searcher) Search

func (s *Searcher) Search(queryStr string, limit int, exact bool) ([]SearchResult, error)

Search performs a search with optional fuzzy matching. When exact is false, fuzzy matching is enabled for typo tolerance.

Jump to

Keyboard shortcuts

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