Fix FTS5 search query missing columns#265
Merged
CalebisGross merged 1 commit intomainfrom Mar 20, 2026
Merged
Conversation
The SearchByFullText query selected 19 columns but scanMemoryFrom expected 21 (feedback_score and recall_suppressed were added to the memories table but not the FTS join query). This caused every FTS search to fail silently, with retrieval falling back to embedding- only search — losing the BM25 half of hybrid retrieval. Add the two missing columns to the FTS query's SELECT list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add
feedback_scoreandrecall_suppressedto theSearchByFullTextFTS5 join query. These columns were added to the memories table but not this query, causing every full-text search to fail with "sql: expected 19 destination arguments in Scan, not 21".Impact
Every retrieval query was silently falling back to embedding-only search, losing the BM25/FTS5 half of hybrid retrieval. This affected recall quality on the running daemon.
Fix
2-line change: add the two missing columns to the SELECT list in the FTS query.
Test plan
make build+make testpassgolangci-lint run— 0 issues