Skip to main content

semantic_search

Function semantic_search 

Source
pub fn semantic_search(
    nodes: &[CodeNode],
    embeddings: &[(String, Vec<f32>)],
    query: &str,
    provider: &dyn EmbeddingProvider,
    top_k: usize,
) -> Result<Vec<SearchResult>>
Expand description

Semantic search over embedded CodeNodes.

Embeds the query text, computes cosine similarity against all embedded nodes, and returns the top-k results.