Benjamin Lu

everyday is cool

Making a Search Result Worth Clicking

Retrospective web development exercise for the 2025 archive.

Build a tiny search index with three Markdown articles. Store each article’s title and canonical URL alongside the text. For a test query that appears in two articles, display both titles and a short excerpt so a reader can tell why each matched.

Try a word that only appears in the navigation. If that returns every article, check whether you’re indexing the rendered layout instead of the article content. Then check that each result still points to the right page after a rebuild.