HN Hall of Fame Weekly email

How Google Code Search Worked: Regex Matching with a Trigram Index (2012)

Screenshot of swtch.com captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 10 calendar years, with breakout response in 4 of them.

submissions
15
submitters
15
observed span
2012–2024
peak thread · 70 comments
434 pts
latest 20+ return · 2024-05-27
96 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

This reminds me of a browser-side search I once wrote using a combination of regex, Soundex, and Damerau-Levenshtein. The reason I made this browser-side is because the app doesn't have that many records that it needed to be on the server; the records were in the hundreds to thousands, not millions. https://github.com/SCPR/fire-tracker/blob/master/app/lib/sea... Not the best code I've ever written by far, but it was a neat little experiment. Basically, indexing each record with Soundex(phonetics) makes the search…

Google made a mistake in killing code search. Indexing the world's source code and making it searchable is so obviously part of their core mission that I wonder how this decision even got made. Yeah, code search is a niche market numerically speaking, but intellectually and economically (considering the economic impact of software) it is vital. Google was doing so much better a job of it than anybody else that they completely owned the space. How could that not be…

gruseom·287-point thread·

I am planning on adding functionality like this to ripgrep. If folks have opinions on how it should work, I'd love to hear from you! https://github.com/BurntSushi/ripgrep/issues/1497

Debian Code Search is based on this work! :) https://codesearch.debian.net/ (If you want a lot more details, check out my thesis on it: https://codesearch.debian.net/research/bsc-thesis.pdf)

secure·122-point thread·

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
4

100+ points or 50+ comments

Total points
1135

reference only — not used in Hall rules or ranking

Total comments
180

reference only — not used in Hall rules or ranking

Every submission