Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Thesaurus Problem

43 views
Skip to first unread message

Mike C#

unread,
May 20, 2006, 9:56:06 PM5/20/06
to
Hi, I'm having problems with FTS and the Thesaurus (US-ENG) on SQL 2005. I
want to add a simple replacement value - "admin" = "administration" to my
thesaurus. Here's my thesaurus file:

<XML ID="Microsoft Search Thesaurus">
<thesaurus xmlns="x-schema:tsSchema.xml">
<diacritics = false/>
<expansion>
<sub>Internet Explorer</sub>
<sub>IE</sub>
<sub>IE5</sub>
<sub>IE6</sub>
</expansion>
<replacement>
<pat>NT5</pat>
<pat>W2K</pat>
<sub>Windows 2000</sub>
</replacement>
<replacement>
<pat>admin</pat>
<sub>administration</sub>
</replacement>
<expansion>
<sub>run</sub>
<sub>jog</sub>
</expansion>
</thesaurus>
</XML>

I also tried it with the <diacritics_sensitive>0</diacritics_sensitive> tag
in all the MS examples. This file is tsENU.xml. After changing, I restart
both the SQL Server Full Text Search and SQL Server services. Here's my
sample script on the Adventureworks DB:

CREATE FULLTEXT CATALOG AWFullTextCat

CREATE FULLTEXT INDEX ON HumanResources.Department
(
GroupName
Language 0X0
)
KEY INDEX PK_Department_DepartmentID ON AWFullTextCat
WITH CHANGE_TRACKING AUTO
GO

SELECT * FROM HumanResources.Department
WHERE CONTAINS(GroupName, 'FORMSOF(THESAURUS, "admin")' )
GO

DROP FULLTEXT INDEX ON HumanResources.Department
DROP FULLTEXT CATALOG AWFullTextCat
GO

If I change the SELECT statement to:

SELECT * FROM HumanResources.Department
WHERE CONTAINS(GroupName, 'FORMSOF(THESAURUS, "administration")' )
GO

I get five columns back. If I use FORMSOF(THESAURUS, "admin"), I get none.
Any help is appreciated. Thanks!


Mike C#

unread,
May 20, 2006, 9:57:27 PM5/20/06
to

"Mike C#" <x...@yyy.com> wrote in message news:4OPbg.1303$%02....@fe09.lga...

Oops, typo:

> If I change the SELECT statement to:
>
> SELECT * FROM HumanResources.Department
> WHERE CONTAINS(GroupName, 'FORMSOF(THESAURUS, "administration")' )
> GO
>
> I get five columns back. If I use FORMSOF(THESAURUS, "admin"), I get
> none. Any help is appreciated. Thanks!

Should be "I get five rows back." Sorry, and thanks.


Mike C#

unread,
May 21, 2006, 1:19:39 PM5/21/06
to
Issue resolved. Apparently the text editor I was using (TextPad) wasn't
saving the Thesaurus file in the correct format.

Thanks.

"Mike C#" <x...@yyy.com> wrote in message news:4OPbg.1303$%02....@fe09.lga...

0 new messages