dbTalk Databases Forums  

repost: SQL Server FT thesaurus file problem ..

microsoft.public.sqlserver.fulltext microsoft.public.sqlserver.fulltext


Discuss repost: SQL Server FT thesaurus file problem .. in the microsoft.public.sqlserver.fulltext forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve M
 
Posts: n/a

Default repost: SQL Server FT thesaurus file problem .. - 11-07-2009 , 08:11 AM






Hi -

I'm running SQL 2k5 Std Ed on Win XP Pro, current on SPs and patches.The
server collation is: SQL_Latin1_General_CP1_CI_AS

I tried to implement a minimal FT index Thesaurus file test:

create table FT_test (
FT_test_Id int identity(1,1) ,
theText varchar(8000)
)

insert FT_test values('run')

CREATE FULLTEXT CATALOG [test]
IN PATH N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData'
WITH ACCENT_SENSITIVITY = OFF
AS DEFAULT
AUTHORIZATION [dbo]

CREATE unique CLUSTERED INDEX [idx_FT_test] ON [dbo].[FT_test] (FT_test_Id
ASC)

alter table FT_test add CONSTRAINT [idx_FT_test_PK] PRIMARY KEY NONCLUSTERED
( FT_test_Id ASC )

CREATE FULLTEXT INDEX ON [dbo].[FT_test](theText)
KEY INDEX [idx_FT_test] on [test] with CHANGE_TRACKING OFF , NO POPULATION

Alter Fulltext Index on [dbo].[FT_test] start Full Population

Then I altered the file:
tsENU.xml
in the path:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData

to read:
<XML ID="Microsoft Search Thesaurus">
<thesaurus xmlns="x-schema:tsSchema.xml">
<diacritics_sensitive>0</diacritics_sensitive>
<expansion>
<sub>Internet Explorer</sub>
<sub>IE</sub>
<sub>IE5</sub>
</expansion>
<replacement>
<pat>NT5</pat>
<pat>W2K</pat>
<sub>Windows 2000</sub>
</replacement>
<expansion>
<sub>run</sub>
<sub>jog</sub>
</expansion>
</thesaurus>
</XML>

in a "SQL Server Enterprise Manager" "New Query" text pain.

Then, I restarted the "SQL Server FullText Search (SQL2K5)" in the
"Services" application.

And now expect the following query should return 1 row:
select * from FT_test where contains(theText, 'jog')

instead it returns nothing.

Q1: What am I doing wrong ?
Q2: if I put a few hundred entries into a thesaurus file, will it noticably
slow either FT queries or FT crawls, on a production 8-way x64 server,
compared to not using the thesaurus files ?

Thanks for any assistance.

SteveM

Reply With Quote
  #2  
Old   
hilary
 
Posts: n/a

Default Re: repost: SQL Server FT thesaurus file problem .. - 11-07-2009 , 08:10 PM






1) Thesaurus only works for freetext searches or formsof(thesaurus with
contains.
select * from FT_test where contains(theText, 'formsof(thesaurus, ''jog'')')

2) no.

"Steve M" <SteveM (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi -

I'm running SQL 2k5 Std Ed on Win XP Pro, current on SPs and patches.The
server collation is: SQL_Latin1_General_CP1_CI_AS

I tried to implement a minimal FT index Thesaurus file test:

create table FT_test (
FT_test_Id int identity(1,1) ,
theText varchar(8000)
)

insert FT_test values('run')

CREATE FULLTEXT CATALOG [test]
IN PATH N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData'
WITH ACCENT_SENSITIVITY = OFF
AS DEFAULT
AUTHORIZATION [dbo]

CREATE unique CLUSTERED INDEX [idx_FT_test] ON [dbo].[FT_test] (FT_test_Id
ASC)

alter table FT_test add CONSTRAINT [idx_FT_test_PK] PRIMARY KEY
NONCLUSTERED
( FT_test_Id ASC )

CREATE FULLTEXT INDEX ON [dbo].[FT_test](theText)
KEY INDEX [idx_FT_test] on [test] with CHANGE_TRACKING OFF , NO POPULATION

Alter Fulltext Index on [dbo].[FT_test] start Full Population

Then I altered the file:
tsENU.xml
in the path:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData

to read:
XML ID="Microsoft Search Thesaurus"
thesaurus xmlns="x-schema:tsSchema.xml"
diacritics_sensitive>0</diacritics_sensitive
expansion
sub>Internet Explorer</sub
sub>IE</sub
sub>IE5</sub
/expansion
replacement
pat>NT5</pat
pat>W2K</pat
sub>Windows 2000</sub
/replacement
expansion
sub>run</sub
sub>jog</sub
/expansion
/thesaurus
/XML

in a "SQL Server Enterprise Manager" "New Query" text pain.

Then, I restarted the "SQL Server FullText Search (SQL2K5)" in the
"Services" application.

And now expect the following query should return 1 row:
select * from FT_test where contains(theText, 'jog')

instead it returns nothing.

Q1: What am I doing wrong ?
Q2: if I put a few hundred entries into a thesaurus file, will it
noticably
slow either FT queries or FT crawls, on a production 8-way x64 server,
compared to not using the thesaurus files ?

Thanks for any assistance.

SteveM

Reply With Quote
  #3  
Old   
Steve M
 
Posts: n/a

Default Re: repost: SQL Server FT thesaurus file problem .. - 11-19-2009 , 07:29 AM



Hi -

Um, I tried the code you gave as an example:

select * from FT_test where contains(theText, 'formsof(thesaurus, ''jog'')')

, and it didn't return anything. Clean boot, waited after giving the
population command, no error messages ..

I just re-tried it on a new clean db and new catalog. Same result.

???


"hilary" wrote:

Quote:
1) Thesaurus only works for freetext searches or formsof(thesaurus with
contains.
select * from FT_test where contains(theText, 'formsof(thesaurus, ''jog'')')

2) no.

"Steve M" <SteveM (AT) discussions (DOT) microsoft.com> wrote in message
news:C1BB48BB-6AED-4415-A7FD-9FCE215A7599 (AT) microsoft (DOT) com...
Hi -

I'm running SQL 2k5 Std Ed on Win XP Pro, current on SPs and patches.The
server collation is: SQL_Latin1_General_CP1_CI_AS

I tried to implement a minimal FT index Thesaurus file test:

create table FT_test (
FT_test_Id int identity(1,1) ,
theText varchar(8000)
)

insert FT_test values('run')

CREATE FULLTEXT CATALOG [test]
IN PATH N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData'
WITH ACCENT_SENSITIVITY = OFF
AS DEFAULT
AUTHORIZATION [dbo]

CREATE unique CLUSTERED INDEX [idx_FT_test] ON [dbo].[FT_test] (FT_test_Id
ASC)

alter table FT_test add CONSTRAINT [idx_FT_test_PK] PRIMARY KEY
NONCLUSTERED
( FT_test_Id ASC )

CREATE FULLTEXT INDEX ON [dbo].[FT_test](theText)
KEY INDEX [idx_FT_test] on [test] with CHANGE_TRACKING OFF , NO POPULATION

Alter Fulltext Index on [dbo].[FT_test] start Full Population

Then I altered the file:
tsENU.xml
in the path:
C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\FTData

to read:
XML ID="Microsoft Search Thesaurus"
thesaurus xmlns="x-schema:tsSchema.xml"
diacritics_sensitive>0</diacritics_sensitive
expansion
sub>Internet Explorer</sub
sub>IE</sub
sub>IE5</sub
/expansion
replacement
pat>NT5</pat
pat>W2K</pat
sub>Windows 2000</sub
/replacement
expansion
sub>run</sub
sub>jog</sub
/expansion
/thesaurus
/XML

in a "SQL Server Enterprise Manager" "New Query" text pain.

Then, I restarted the "SQL Server FullText Search (SQL2K5)" in the
"Services" application.

And now expect the following query should return 1 row:
select * from FT_test where contains(theText, 'jog')

instead it returns nothing.

Q1: What am I doing wrong ?
Q2: if I put a few hundred entries into a thesaurus file, will it
noticably
slow either FT queries or FT crawls, on a production 8-way x64 server,
compared to not using the thesaurus files ?

Thanks for any assistance.

SteveM


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.