Documentation
¶
Overview ¶
Package search handles vector similarity search for repositories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SearchFilters ¶
type SearchFilters struct {
Language *string
Starred *bool
Owned *bool
Owner *string
Limit int // default 3
}
SearchFilters contains optional filters for search queries.
type SearchQueryResult ¶
type SearchQueryResult struct {
Results []SearchResult
TotalConsidered int
QueryEmbeddingMs int64
SearchMs int64
}
SearchQueryResult contains the search results and timing metrics.
func SearchRepos ¶
func SearchRepos(ctx context.Context, db *sql.DB, embedProvider provider.EmbeddingProvider, query string, filters SearchFilters) (SearchQueryResult, error)
SearchRepos embeds the query and performs a cosine similarity search against chunk_embeddings. Results are deduplicated by repo (highest similarity chunk per repo), then capped at Limit.
Click to show internal directories.
Click to hide internal directories.