mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
0b915b76ce
The search fallback (strategy 5) was using min() to select the best match from FTS results, which selected the WORST match instead of the best. On both SQLite and Postgres backends, higher scores indicate better matches (FTS rank, vector similarity normalized to [0,1], hybrid fusion). Using max() correctly returns the highest-scoring result. Fixes #640 Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>