Fuzzy search (pg_trgm) + living-person protection #15

Merged
justin merged 1 commits from phase2-search-privacy into main 2026-06-07 07:55:14 -04:00
Owner

Trigram name search endpoint + indexes; privacy engine redacts possibly-living people from non-members of public trees.

Trigram name search endpoint + indexes; privacy engine redacts possibly-living people from non-members of public trees.
justin added 1 commit 2026-06-07 07:55:14 -04:00
Fuzzy search: pg_trgm extension + trigram GIN indexes on name parts and a GET /trees/{id}/persons?q= search ranked by trigram similarity (finds Mueller for 'muller'), privacy-filtered. Living-person protection: the privacy engine now derives possibly-living status (explicit flag, else no death fact + birth within ~100y or unknown) and returns 'redacted' for non-members of public/unlisted trees; the service minimises those records ('Living person', no vitals). Members are unaffected. 31 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Paul <justin@jpaul.me>
justin merged commit 584b323121 into main 2026-06-07 07:55:14 -04:00
Sign in to join this conversation.