Skip to main content

get_code_search

Function get_code_search 

Source
pub async fn get_code_search(
    configuration: &Configuration,
    q: Option<&str>,
    type: Option<&str>,
    repo: Option<&str>,
    limit: Option<i32>,
) -> Result<SearchResults, Error<GetCodeSearchError>>
Expand description

Finds code in the caller org’s index across three orthogonal retrieval tiers fused by reciprocal-rank fusion: lexical (FTS5 trigram over code-tokenized text), symbolic (real definition and reference edges), and semantic (embedding cosine over AST-boundary chunks). Pick one tier with type, or leave it to run all three as hybrid, which is what a coding agent usually wants. It is FAIL-HONEST: a retrieval outage answers 200 with an empty result set and "degraded": true rather than a 5xx, so an agent degrades instead of stalling. A malformed regex is a 400.