SQLTeam.com | Weblogs | Forums

Full text search with correction

sql2012
sql2008r2

#1

hi to All
i have a database in that we have implement a free text search
while search we have to pass the exact word, if we did minor mistake in spelling , it will not produce a result Please suggest me what i have to do for that i have follow the below steps

CREATE FULLTEXT CATALOG 
FTDFTC 
WITH ACCENT_SENSITIVITY = ON

CREATE FULLTEXT INDEX ON MyTopic
(Name,	Topic,	Text1,	[Description] LANGUAGE 1033)
KEY INDEX PK_MyTopic
ON FTDFTC
WITH STOPLIST = SYSTEM

#2

SQL Server Full Text Search does not perform spelling corrections, or matches on minor spelling differences. The only way I can think of to support this feature is to use a custom thesaurus:

https://msdn.microsoft.com/en-us/library/ms142491(v=sql.110).aspx

You would have to populate your own thesaurus files with the misspelled and correct word. You can find lists of common misspellings online so it shouldn't be too hard, but it's not a dynamic system like Google:

http://norvig.com/spell-correct.html

Alternately, you can integrate a 3rd party spelling corrector and then pass the corrected text to your full-text query.