Files
Garry TanandClaude Fable 5 eeecc90968 fix(takes): keyword search matches words in long claims via word_similarity (#3267)
Both engines' searchTakes used whole-string trigram similarity
(claim % query), which structurally cannot pass the 0.3 threshold for a
short keyword against a 100-200 char claim — keyword search returned
zero results on real brains. Switch the predicate to word similarity
(query <% claim) and rank by word_similarity(query, claim), in both
postgres-engine and pglite-engine per the engine-parity invariant.
Holder allow-list and source-scope filters unchanged.

Regression test: single-word query must match a long claim containing
it (fails under the old predicate).

Fixes #3267

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 15:38:58 -07:00
..