From ca8c967959b7a9722db8ce99773fbdb224c89a91 Mon Sep 17 00:00:00 2001 From: Caleb Gross Date: Fri, 20 Mar 2026 13:25:16 -0400 Subject: [PATCH] fix: add missing columns to FTS5 search query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- internal/store/sqlite/sqlite.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/store/sqlite/sqlite.go b/internal/store/sqlite/sqlite.go index cda0d1d..6bc09ae 100644 --- a/internal/store/sqlite/sqlite.go +++ b/internal/store/sqlite/sqlite.go @@ -1125,7 +1125,8 @@ func (s *SQLiteStore) SearchByFullText(ctx context.Context, query string, limit ftsQuery := ` SELECT m.id, m.raw_id, m.timestamp, m.type, m.content, m.summary, m.concepts, m.embedding, m.salience, m.access_count, m.last_accessed, m.state, m.gist_of, m.episode_id, - m.source, m.project, m.session_id, m.created_at, m.updated_at + m.source, m.project, m.session_id, m.created_at, m.updated_at, + m.feedback_score, m.recall_suppressed FROM memories m JOIN memories_fts ON m.rowid = memories_fts.rowid WHERE memories_fts MATCH ?