Repository navigation
v0.24.0 — search ranks by match quality; read paths stop writing
Search ranks by match quality, and the read paths stop writing.
v0.23.0 repaired the FTS5 legs and exposed a scoring bug they had been hiding:
four retrieval tiers fed one sort on incompatible scales -- a hardcoded -15.0
from the LIKE tier against raw bm25 from the FTS tiers. bm25 has no fixed range
(-13.42 for one name, -40.87 for another), so no constant could reconcile them,
and a symbol FTS5 found could sort below one only LIKE could find.
RANKING. Match quality decides, in rungs: exact, exact-but-for-case, same
word-parts, all tokens in order, any order, substring. A rung is worth more than
every within-rung adjustment combined, so a better match can never be outranked
by a worse one with stronger statistics. Identifier shape, definitional kind,
vendored status and bm25 break ties inside a rung and never across one. One
implementation now serves both workspace and single-repo mode; single-repo is
what the published plugin runs, and it had been carrying an older copy whose
case-sensitive exact test gave checkPoint no bonus at all.
RESULTS. Repeated symbols collapse to one row carrying duplicates: distinct
names in a top-20 went id 2 -> 16, db 4 -> 18, e 2 -> 20. Every row carries
name_match, and a query matching no name anywhere returns a few marked body
hits rather than a full page of them.
RETRIEVAL. limit truncates instead of changing what is retrieved -- it had
been scaling the candidate pool, so a smaller limit was not a prefix of a larger
one. The full scan is skipped for multi-token queries, which it cannot help
(measured 0 rows across the whole workspace for four such queries), and prefix
matching is added where it is 4-70 ms against the scan's 725+.
CORRECTNESS. reindex refuses a foreign path in both modes: path was used as a
new index ROOT, so it deleted every indexed file outside it. A query containing
FTS5 syntax is now searched rather than counted as a dead search leg -- one
get( produced 117 warnings into the health signal and returned nothing; it now
returns results and no warnings. Database.close() no longer checkpoints, which
had made seventeen read paths writers.
363 tests. A 29-case golden set against a real 39-project workspace gates the
ranking; it was 21/29 before this work and is 29/29 after.