Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I define which word breakers to use when building a mssql fulltext index?

I have created a fulltext catalog that stores the data from some of the columns in a table, but the contents seem to have been split apart by characters that I don't really want to be considered word delimiters. ("/", "-", "_" etc..)

I know that I can set the language for word breaker, and http://msdn.microsoft.com/en-us/library/ms345188.aspx gives som idea on how to install new languages - but I need more direct control than that, because all of those languages still break on the characters I want to not break on.

Is there a way to define my own language to use for finding word breakers?

like image 235
Zaz Avatar asked Oct 12 '10 12:10

Zaz


1 Answers

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.

like image 186
Torpedo Avatar answered Nov 12 '22 23:11

Torpedo