← Back to PRs

#15234: fix(memory): use OR instead of AND in FTS5 query builder

by niceysam open 2026-02-13 06:04 View on GitHub →
stale size: XS
`buildFtsQuery` joins tokens with `AND`, so multi-word queries like "meeting budget review" only match if all three words appear in a single chunk. In practice this means most multi-word searches return nothing. Changed the join to `OR`. BM25 ranking already pushes multi-match results to the top, so recall improves without hurting precision. Updated tests to match. All 4 hybrid tests pass. Fixes #15226

Most Similar PRs