Code reference detail
search.ts
packages/cli/src/commands/search.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| 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 | |
| katz_search | done | Search can bias matches by inbound Katz centrality ( [katz_centrality] ). The bias is off unless the caller sets it. CLI flag: `reqlan search <query> --katz`. API field: `SearchRequirementsOptions.katz`. When the bias is on, the score is `textScore * (1 + katzScore)`. The match reasons include `katz:<score>`. Context hop decay runs first. The Katz multiplier runs second. When the bias is off, match order and scores stay on the text ranking. | 0.082 | |
| 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
"../../packages/cli/src/commands/search.ts", ../../packages/cli/src/commands/search.ts