🔍 Search engine

← Portfolio

A search engine built from scratch in PHP — inverted index, BM25 ranking and typo tolerance — searching the real content of this site (blog articles, pages, portfolio). Misspell on purpose: it will correct you.

Start typing — results appear instantly.

⚙️ How it works: on each request the server gathers the documents, tokenizes them (stripping diacritics and stop words) and builds an inverted index — a map from every word to the documents it appears in. Results are ranked with BM25, the relevance formula used by real engines: rare words weigh more, and long documents are normalized. If a word is not in the index, the Levenshtein distance finds the closest term and suggests a correction.