Code reference detail
unified.rs
reqlan rq/core_analysis/crates/reqlan-search/tests/unified.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| search_rust | done | Port [search_reqs.fuzzy_search] ( separator-insensitive ranking ), [search_reqs.contextual_search] ( hop-distance rerank ), and [search_reqs.semantic_search] into `reqlan-search`. Same `AnalysisApi.searchRequirements` / `--context` contract ( [cli.commands] ). Activity-bar idea search uses `WorkspaceIndexRuntime.fuzzy_search` / napi `NativeWorkspaceIndex.fuzzySearch` so ranking stays next to rusqlite and only capped hits cross into JS. Mixed list includes indexed `.rq` file-name hits ( `kind` `file` ) and pages with `offset` / `limit` ( `truncated` ). Client-side highlight helpers used by webviews may stay in the TS `./fuzzy-search` export until a shared WASM / JS copy is needed. | 0.115 | |
| unified_search | done | Unified ranking engine combining [semantic_search] signals ( name, summary, tokens, tags, edge labels ) with [fuzzy_search] signals ( basename, stem, full path, separator-insensitive matching, word-order boost ) plus context hop decay ( [contextual_search] ) and Katz centrality bias ( [katz_search] ). Scoring per hit: - Name exact ( + 3 ) / name contains ( + 1 ) - Summary exact ( + 2 ) / summary contains ( + 1 ) - Token overlap ( + 1 per token ) - Tag match ( + 1 per tag ) - Edge label match ( + 1 per label ) - File basename exact ( + 100 ) / basename contains ( + 80 ) / stem exact ( + 100 ) / stem contains ( + 50 ) / file URI contains ( + 50 ) - Word order boost: ordered ( + 45 ) / reordered ( + 35 ) - Empty query returns all ideas + files at score 100 Applies context hop decay: score * = 2 ^ ( - minHop ), unreachable floor = 8 hops. Applies Katz centrality bias: score * = ( 1 + katzScore ) for idea hits. Dynamic candidate cap: limit * 8 ( min 16 ) for non-empty query; 400 for empty query. Consumed by CLI `reqlan search` via [native_analysis_api] `searchRequirements`. | 0.036 |
Reference labels
search_rust, unified_search