Tech
"Did you mean...?" — autocomplete and spelling correction in pure Python (no external services)
Search boxes that only match exactly what you typed feel broken. Type pythn and get nothing; forget the last two letters of a word and get nothing. The two features that fix this — autocomplete (suggest as you type) and "did you mean?" spelling correction — are usually where people reach for Elasticsearch or a hosted API.
You don't need either for a small-to-medium app. Both fall out of an ordinary inverted index, and Whoosh — a full-text search library that's pure Python, no compil...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to