Before any scoring, a search engine turns raw text into terms. A query matches a document only when both produce the exact same term.
The TF-IDF and BM25 demos only lowercase and split on spaces, so Shoes never matches shoe,. Real engines (Lucene, Elasticsearch, OpenSearch) run both documents and queries through the same chain of steps, called an analyzer:
Tokenizerun, fast! → runfast
→
LowercaseRUN → run
→
Fold accentscafé → cafe
→
Stop wordsthe cat → cat
→
Synonymsshoes → +sneakers
→
Stem / Lemmatizerunning → run
The order matters: each step only sees what the previous one produced.
1. Settings
2. Pipeline Explorer
Watch your text change at each step. Disabled steps are greyed out.
3. Query Matching
Which query words does each document contain? Naive splitting (as in the TF-IDF and BM25 demos) vs. the pipeline above. Documents go through the same pipeline as the query, except synonyms.