Code reference detail
contextual.rs
crates/reqlan-search/tests/contextual.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| analytical_rust_port | in-progress | Port ["../core-architecture.rq".analytical_package] to Rust: lexer, parser ( index path ), extractor, SQLite index, search, and export. `@reqlan/analytical` remains the published JS facade ( `createAnalysisRuntime` / `AnalysisApi` / Zustand host state ). Native work lives in a `crates/` Cargo workspace and ships as per-architecture binaries per [distribution.rust_binary_distribution]. The editor language server is [lsp_rust.language_server_rust]. This analytical port does not replace that process. Component plans: [rust_crate_layout], [lexer_rust], [parser_rust], [parser_align], [indexer.indexer_rust], [search_rust], [export_rust], [native_bridge], [cutover]. | 0.243 | |
| 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.137 | |
| contextual_search | done | Search string plus an optional context list of relative `.rq` paths, `path#idea` refs, or bare idea names. Runs [semantic_search], then re-ranks with min undirected hop distance from any resolved context idea and exponential decay ( [idea_graph_distance] ): `finalScore = textScore * 2^(-minHop)` ( unreachable floor = 8 hops ). Surfaces: [native_analysis_api] `searchRequirements(..., { context })` and CLI `reqlan search --context` ( [search_cli] ). Implements [search_with_context]. PageRank ( [pagerank] ) and full [context_scope_v2] ingestion remain future work. Default ranking does not use Katz. Opt in with [katz_search]. Complements [fuzzy_search] when neighbourhood / context should bias ranking. ["../cli/click.rq".click_input] ranks ambiguous click matches the same way, with session ideas as context. | 0.208 | |
| search | Search over the requirement graph — find ideas by name, body, tags, and related signals. Surfaces: [fuzzy_search], [file_search], [contextual_search], [semantic_search], [katz_search]. Consumed by CLI `reqlan search`, MCP / chat tools, Ideas Summary, and the activity-bar search pane. Rust ranking engine: ["./rust_port.rq".search_rust]. | 0.046 |
Reference labels
"../../crates/reqlan-search/tests/contextual.rs:nearer_ideas_rank_above_farther_with_equal_text_scores", "../../crates/reqlan-search/tests/contextual.rs:reranks_using_graph_edges_from_context_seeds", ../../crates/reqlan-search/tests/contextual.rs:nearer_ideas_rank_above_farther_with_equal_text_scores, ../../crates/reqlan-search/tests/contextual.rs:reranks_using_graph_edges_from_context_seeds