Documentation
¶
Overview ¶
Package rank reranks FTS-ranked code-search candidates using dependency-free structural signals (name fuzzy similarity, path proximity), so both the CLI `search` command and the MCP `search` tool share one ranking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchLimit ¶
FetchLimit widens the candidate pool pulled from FTS so structural reranking (and any path filtering) has more than the caller's `limit` rows to reorder; the final slice is bounded back to `limit` after reranking. @intent retain enough backend candidates for structural relevance signals to affect the caller's bounded result. @domainRule candidate pools stay between 50 and 500 rows regardless of the requested result limit.
func Rerank ¶
Rerank reorders FTS-ranked search candidates using structural signals fused with the backend rank via Reciprocal Rank Fusion.
@requires nodes is the backend's rank-ordered candidate slice (index == FTS rank). @ensures deterministic output; empty query or empty nodes returns the input bounded by limit, preserving FTS order. @intent combine backend relevance with identifier-name and file-path similarity without losing deterministic FTS tie order.
Types ¶
This section is empty.