Text Analysis — Turning Messy Text into Searchable Terms
Before a single word goes into the index, it passes through a quiet, decisive step: text analysis. Deciding what counts as a "word," how to normalize it, and which words to keep is what lets a search for "running" find a document about "ran," and what makes "The" not clog the index. Get analysis right and search feels intelligent; get it wrong and no clever ranking can save it. This post is about the unglamorous preprocessing that quietly determines search quality.
Before a word hits the index it passes through text analysis: tokenization (what is a word?), normalization (case folding, stemming vs lemmatization), stop words, and synonyms. The unglamorous step where a huge share of search quality is won — and where query and documents must speak the same vocabulary.