You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Postgres title search reports score 0.000 for every hit #1983
Smoke test of Cloud development on core 1.0.0 (2026-10-30). bm_search(query="Core 1.0 smoke", mode="title") returned both matching notes in the right order (exact title first, from #1957), but each with score 0.000.
Why
As #1957 notes, a title-only search on Postgres has no rank: it filters with to_tsvector('english', search_index.title) @@ to_tsquery(...) and adds the exact-title leading_order_by, but nothing computes a score. SQLite ranks with bm25(), so the two backends disagree.
Why it matters
The order is right, so this is mostly cosmetic. But an agent reading "score 0.000" can take it as "no real match" and drop good results, and scores differ between local (SQLite) and Cloud (Postgres).
Fix
Give Postgres title search a score: ts_rank over the title vector, with the exact-title match ranked first as now (or a fixed top score for exact matches). Add a Postgres repository test that title hits have positive scores and the exact title still comes first.
Component: MCP search tool, backed by the Postgres search repository. The issue shows up on Cloud, so I applied the cloud label.
Priority: Low. Result order is correct. The only problem is that every title hit reports score 0.000, which an agent could misread as "no real match". Scores also differ between local (SQLite bm25()) and Cloud (Postgres).
Complexity: Simple. The suggested fix is to add a ts_rank score over the title vector in the Postgres title-only path. The exact-title ordering stays as it is, or exact matches get a fixed top score. Add a Postgres repository test for positive scores and exact-title-first ordering.
Activity
claude commentedon Oct 30, 2026
Claude finished @phernandez's task in 15s —— View job
Triage
bug)cloudlabel.score 0.000, which an agent could misread as "no real match". Scores also differ between local (SQLitebm25()) and Cloud (Postgres).ts_rankscore over the title vector in the Postgres title-only path. The exact-title ordering stays as it is, or exact matches get a fixed top score. Add a Postgres repository test for positive scores and exact-title-first ordering.bm_search(query="Core 1.0 smoke", mode="title")on Postgres.Per the triage-only scope, I haven't made any code changes.
fix(core): rank Postgres prefix queries by the words typed; score titles