Skip to content

Fix FTS5 search query missing columns#265

Merged
CalebisGross merged 1 commit intomainfrom
fix/fts-scan-columns
Mar 20, 2026
Merged

Fix FTS5 search query missing columns#265
CalebisGross merged 1 commit intomainfrom
fix/fts-scan-columns

Conversation

@CalebisGross
Copy link
Copy Markdown
Collaborator

Summary

Add feedback_score and recall_suppressed to the SearchByFullText FTS5 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

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>
@CalebisGross CalebisGross merged commit f197c75 into main Mar 20, 2026
6 checks passed
@CalebisGross CalebisGross deleted the fix/fts-scan-columns branch March 20, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant