Hacker News new | ask | show | jobs
by onlyrealcuzzo 2612 days ago
I was just going to ask: Will SQL work with spelling corrections?

I was under the impression that if you wanted to do auto-complete, you need to handle mis-spellings, and that ElasticSearch is one of the best options for this.

2 comments

SQL doesn't. Some relational databases have full-text search extensions like Postgres and SQL Server but they offer the basic stemming and trigram stuff, no spelling or synonyms. You can get an autocomplete working using wildcard matches but you won't be able to recognize that a word is misspelled without maintaining your own dictionary.
AFAIK, SQL engines will do a fairly reasonable full-text search, but if you need anything more, you have to upgrade to a full-featured search engine.