Search-as-you-type for 54 Million Names: PostgreSQL + Django...
summary
Built a search-as-you-type system over 54 million North Carolina court records using PostgreSQL and Django that turns 20s queries into live results under 10ms. It combines Daitch-Mokotoff + Levenshtein<=2 to broaden phonetic matches then filter false positives, annotates queries with Postgres functions wrapped as Django Funcs, and relies on text_pattern_ops B-tree + GIN indexes and COLLATE "C" for speed. A Jupyter notebook and sample app reproduce the benchmarks; trade-offs include large index size and noisy phonetic matches unless constrained.
AI-written summary · about
