fix(kbsearch): rank FTS correctly, filter before -n, start the daemon. (#5)

Go search took worst BM25 hits (ORDER BY score), cut to -n before --root,
and never called ensureDaemon. Ranking and flag parsing move to a cgo-free
package so CI can fail those regressions without ladybug. --hop errors
instead of being swallowed into the query.
This commit is contained in:
2026-08-13 12:19:26 +01:00
committed by GitHub
co-authored by GitHub
parent ebc3f948c1
commit 669e184cf6
10 changed files with 394 additions and 160 deletions
+4 -2
View File
@@ -8,7 +8,9 @@
// kbsearch --list-model print the resolved model dir
//
// The potion-multilingual model is loaded only in `serve`; a CLI reuses the
// daemon over localhost HTTP (falling back to in-process embedding).
// daemon over localhost HTTP (KBSEARCH_PORT, default 17830) and starts one in
// the background when none answers. KBSEARCH_NO_DAEMON=1 skips that and embeds
// in-process instead.
package main
import (
@@ -41,4 +43,4 @@ func main() {
return
}
os.Exit(runSearch(os.Args[1:]))
}
}