init commit
This commit is contained in:
27
internal/search/search.go
Normal file
27
internal/search/search.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user