SQL Server Full-Text Search – Managing Thesaurus Entries

full-text-searchsql serversql-server-2005

I'm thinking of adding a full text search to our product (currently using SQL 2005 Enterprise), so just doing some preliminary research.

I read that you can add thesaurus entries, so "Internet Explorer" would also have related entries such as "IE", "IE7" and so on.

Would it also work in reverse, so if I enter "IE7" would it find "Internet Explorer"?

Best Answer

You should really consider upgrading to a more recent version, especially if you want to utilize some of the best parts of Full Text Search.

To your question, the short answer is yes.

From the documentation for 2005, you have two main features to customize in a thesaurus, Expansion Sets and Replacement Sets:

An expansion set contains a group of synonyms. These synonyms are identified in code by "substitution" tags ( and ). Queries that contain matches in one substitution are expanded to include all other substitutions in the expansion set.

and

A replacement set contains a text pattern to be replaced by a substitution set.

So if you place all three of your key words (IE, IE7, Internet Explorer) into a Substitution Set, then they will all trigger matches for each other. You can put as many substitutions in the set as you'd like - it's not a one-way definition for the substitutions.