core practice · coding problem
Spell-correct a search query
Query "javascrpt react hooks" → suggest correction using edit distance ≤2 against vocab ["javascript","react","hooks","python"].
The mechanism
Query rewriting cleans up what the user typed before you look it up in the index: fix spelling, expand synonyms, drop stop words, classify intent. Doing this once up front is what makes the rest of the pipeline work — never trust the raw query.
Expected evidence
javascript react hooks.
Try this drill in the practice workspace →
Hints when you need them
- Rewrite before retrieval.
- Keep original as fallback.