Monday, March 11, 2013

Full-Text Thesaurus Files overview

 

These files let you define synonyms for full text queries. There is one file for every language supported by fulltext search. To list them run the following Query:

1. List Full-text languages and their LCIDs:

SELECT * FROM sys.fulltext_languages ORDER  BY lcid

2. Thesaurus File location  :     $SQL_Server_Install_Path\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\FTData.                                                            

3. Basic File Structure

blog_ft_thesaurus_struct

  • The first element in red <diacritic_sensitive> determines if the thesaurus file is accent-sensitive or note (defaults to 0).
  • <expansion> : determines a set of terms that can be substituted. A full-text query can return results using any of the three terms “Internet Explorer” or “IE” or “IE5”.
  • <replacement> : one term is substituted for another, the terms in the <pad> elements are replaced by the term in the <sub> element, here “NT5” and “W2K” are replaced by “Windows 2000”, i.e if a full-text query includes either “NT5” or “W2K” the results include only content that contains “Windows 2000”.

in SQL server 2008 , you need to run sys.sp_fulltext_load_thesaurus_file as shown below :

EXEC sys.sp_fulltext_load_thesaurus_file 1033 (see above in this to find the LCID for the language).

No comments:

Post a Comment