feat(search): fuzzy/typo tolerance (pg_trgm) #16

Merged
cesnimda merged 1 commits from feature/search-fuzzy into develop 2026-07-01 22:45:11 +02:00
Owner

Slice 4 of search-core: fuzzy/typo fallback via pg_trgm word_similarity (0.3 threshold), fires only when exact search finds nothing. Migration enables pg_trgm (idempotent). Verified typo-correction end-to-end vs live Postgres. Also fixes a recurring dotnet-format drift (DTO comment moved to XML doc).

🤖 Generated with Claude Code

Slice 4 of search-core: fuzzy/typo fallback via pg_trgm word_similarity (0.3 threshold), fires only when exact search finds nothing. Migration enables pg_trgm (idempotent). Verified typo-correction end-to-end vs live Postgres. Also fixes a recurring dotnet-format drift (DTO comment moved to XML doc). 🤖 Generated with Claude Code
cesnimda added 1 commit 2026-07-01 22:42:20 +02:00
feat(search): fuzzy/typo tolerance fallback (pg_trgm word_similarity)
CI / backend (pull_request) Successful in 50s
CI / frontend (pull_request) Successful in 14s
Security / secrets (pull_request) Successful in 5s
Security / dependencies (pull_request) Successful in 54s
c3f53eb470
Slice 4 of search-core: when an exact free-text search returns zero results, fall
back to pg_trgm word_similarity on the subject (explicit 0.3 threshold — pg_trgm's
default 0.6 misses real typos like 'recieved'->'received' ~0.39). Fallback-only, so
it never dilutes good exact matches; fuzzy hits get no ts_headline. Migration enables
the pg_trgm extension (CREATE EXTENSION IF NOT EXISTS — idempotent).

Also relocates the EmailSummaryDto.MatchHighlight note to an XML doc: a comment inside
the record's parameter list was tripping dotnet-format's whitespace check on every
commit (mutating format wouldn't fix it) — moving it out clears that drift for good.

Verified end-to-end vs a live Postgres via throwaway test (removed): typo 'recieved'
fuzzy-matched a subject with 'received'. Build + all 40 tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cesnimda merged commit c0c1777d3f into develop 2026-07-01 22:45:11 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cesnimda/Inboxintel#16