package repository import ( "context" "github.com/user/obsidian-mcp-server/internal/domain" ) type SearchResult struct { Path string `json:"path"` Score float64 `json:"score"` Matches []*SearchMatch `json:"matches"` } type SearchMatch struct { Line int `json:"line"` Content string `json:"content"` ContextBefore string `json:"context_before"` ContextAfter string `json:"context_after"` } type SearchQuery struct { Query string MaxResults int CaseSensitive bool UseRegex bool ContextLines int } type SearchIndex interface { Index(ctx context.Context, note *domain.Note) error Remove(ctx context.Context, path string) error Search(ctx context.Context, query *SearchQuery) ([]*SearchResult, error) Rebuild(ctx context.Context, notes []*domain.Note) error Clear() error }