Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index manages the FTS5 trigram index in a repo DB.
func Open ¶
Open creates an Index from an open repo. Creates FTS5 tables if they don't exist.
Panics if r is nil (TigerStyle precondition).
func (*Index) NeedsReindex ¶
NeedsReindex returns true if the trunk tip has advanced past the indexed checkin. Returns false if the repo has no trunk tip (empty repo).
func (*Index) RebuildIndex ¶
RebuildIndex walks the trunk tip manifest, expands blob content, skips binaries and phantoms, and populates fts_content. No-ops if already current.
Panics if idx is nil (TigerStyle precondition).
type Query ¶
type Query struct {
Term string // search term (min 3 chars, FTS5 special chars escaped internally)
MaxResults int // 0 → default (50)
ContextLines int // lines of surrounding context (0 → just the match line)
}
Query configures a search request.
type Result ¶
type Result struct {
Path string // file pathname
Line int // 1-based line number
Column int // 0-based byte offset within the line
MatchLen int // length of matched substring
LineText string // the matching line
Context string // surrounding lines including match line, newline-separated. Empty if ContextLines=0.
}
Result is a single search hit.
Click to show internal directories.
Click to hide internal directories.