feat(search): fuzzy/typo tolerance (pg_trgm) (#16)
CI / backend (push) Successful in 48s
CI / frontend (push) Successful in 13s
Deploy Staging / deploy (push) Successful in 25s
Security / secrets (push) Successful in 3s
Security / dependencies (push) Successful in 55s
CI / backend (pull_request) Successful in 49s
CI / frontend (pull_request) Successful in 12s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 53s

This commit was merged in pull request #16.
This commit is contained in:
2026-07-01 22:45:10 +02:00
parent 9bbab5d32a
commit c0c1777d3f
6 changed files with 813 additions and 21 deletions
@@ -65,6 +65,9 @@ public class AppDbContext : DbContext, IAppDbContext
// it otherwise (e.g. the InMemory provider used by tests).
if (Database.IsRelational())
{
// pg_trgm powers the fuzzy/typo fallback in SearchService (word_similarity).
modelBuilder.HasPostgresExtension("pg_trgm");
modelBuilder.Entity<Email>().Property(e => e.SearchVector)
.HasColumnType("tsvector")
.HasComputedColumnSql(