Files
doks/internal/search/search.go
2026-01-22 23:03:49 -06:00

28 lines
476 B
Go

package search
type Result struct {
Key string
Filename string
FilePath string
LineNumber int
LineText string
Context []string // Lines before/after for display
Score float64 // For vector search relevance
}
type Options struct {
MaxResults int
ContextLines int
}
func DefaultOptions() Options {
return Options{
MaxResults: 20,
ContextLines: 2,
}
}
type Searcher interface {
Search(query string, opts Options) ([]Result, error)
}