TLDR Web Dev · ARTICLES & TUTORIALS

HOW LEVELS.FYI BUILT SCALABLE SEARCH WITH POSTGRESQL

levels.fyi6 min read

Summary from the TLDR Web Dev newsletter

Levels.fyi developed a scalable fuzzy search solution using PostgreSQL to help users quickly find relevant salary information. Its team's initial approach used simple LIKE queries, but evolved to use materialized views for optimization and full-text search with tsvector for improved results. To further improve search accuracy, they implemented a custom relevance algorithm that used factors like exact matches, popularity, and similarity.