2

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
  • Which db is this? – Chris Aldrich Jul 30 '12 at 19:04
  • The database server is Microsoft SQL 2005 – Adam Mendoza Jul 30 '12 at 19:08
  • This is the answer but I'm not allowed to answer my own question. 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. – Adam Mendoza Jul 31 '12 at 0:15
  • I believe you can answer your own question. You just cannot mark it as an answer for two days. Try it, if not, we can always ping the moderators. – Chris Aldrich Jul 31 '12 at 12:41
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.