Search code examples
sqlfull-text-search

full text search sql server with mistyped words


We are evaluating a bunch of options at the moment for Fuzzy searches. One of our requirements is that mistyped words be matched. An OCR of CRA1G (with the number 1) must match 'CRAIG'.

Full text search in sql server seems to get close, but no cigar.

Are there some options besides 'FORMSOF(Inflectional, CRA1G)' that might be able to make substitutions for these types of mismatches and still get results?

I am unable to find anything similar SOUNDEX is definitely not good enough.

I might try Lucene next, which has good fuzzy search capability.

Regards

Craig.


Solution

  • SQL Server 2008 supports thesauruses should get you to where you need. You would define your misspellings as synonyms. See http://msdn.microsoft.com/en-us/library/ms142491.aspx.

    Edit: To my understanding, you couldn't do this using a wildcard or regular expression approach. You'd have to define common replacement set patterns for your words that you anticipate will be most commonly mis-typed.