Sql-server – Full Text search returns duplicate keys

full-text-searchsql-server-2005

I have a search like the example below. The problem is that the result returns a key muliple times if the term "beach" is in myTextColumn multiple times, for example "I went to the beach because the beach is cool". I need it to be returned only once.

  SELECT DISTINCT          
    Src.[Key] AS MyID
FROM            
    CONTAINSTABLE(MyTable, myTextColumn, N'FORMSOF(INFLECTIONAL,beach )',500) Src
ORDER BY 
    MyID

Best Answer

It turns out that the problem was cause by a bad full text search index. It had to be rebuild with do not track changes, and the correct word breaker for the given language.