3

I are trying to search an FTI using CONTAINS for Twitter-style usernames, e.g. @username, but word breakers will ignore the @ symbol. Is there any way to disable word breakers? From research, there is a way to create a custom word breaker DLL and install it and assign it but that all seems a bit intensive and, frankly, over my head. I disabled stop words so that dashes are not ignored but I need that @ symbol. Any ideas?

Andrew Tibbetts
  • 2,874
  • 3
  • 23
  • 28
  • I found this stack — http://stackoverflow.com/questions/3914798/can-i-define-which-word-breakers-to-use-when-building-a-mssql-fulltext-index — but again, the accepted answer leads down a complicated, slippery slope. There's got a be a simple solution. – Andrew Tibbetts Sep 14 '12 at 14:12

1 Answers1

2

You're not going to like this answer. But full text indexes only consider the characters _ and ` while indexing. All the other characters are ignored and the words get split where these characters occur. This is mainly because full text indexes are designed to index large documents and there only proper words are considered to make it a more refined search.

We faced a similar problem. To solve this we actually had a translation table, where characters like @,-, / were replaced with special sequences like '`at`','`dash`','`slash`' etc. While searching in the full text, u've to again replace ur characters in the search string with these special sequences and search. This should take care of the special characters.

Torpedo
  • 129
  • 4
  • 14