Re: Thesaurus on full-text search is not working



Sorry, one more post to correct myself:

TextPad does write Unicode files when it's read them. What TextPad wasn't
doing was writing byte order marks, which apparently Sql Server 2005
requires. So changing THAT setting allows the thesaurus to work. I'm not
using it anymore though - too much hassle to set up, too fragile and not
much flexibility if you have to re-start the sql server service to change
words!!

"Richard A. Lowe" <chadich@xxxxxxxxx> wrote in message
news:uoTsMLYzGHA.576@xxxxxxxxxxxxxxxxxxxxxxx
Sorry, guys, I did a ton of Googling before I posted this, but then, of
course, I saw this:

http://groups.google.com/group/microsoft.public.sqlserver.fulltext/browse_thread/thread/1560031044204408/36ef0c301150aa4a?lnk=gst&q=thesaurus&rnum=2#36ef0c301150aa4a

Essentially, this guy was having the same problem I was... the thesaurus
wasn't working because he was using TextPad which I also use, which saves
ANSI text by default. Sql Server wants Unicode and when I changed TextPad
to save as unicode, it worked.

Richard

"Richard A. Lowe" <chadich@xxxxxxxxx> wrote in message
news:eH13oEYzGHA.4448@xxxxxxxxxxxxxxxxxxxxxxx
Hi all, here's my setup:

Sql Server 2005 on Windows Server 2003 (standard). I have a datbase (Sql
90 compatibility level). I have very trivial example set up to try to
get the thesaurus to work.

My table:
CREATE TABLE TestData
(
TestDataID int PRIMARY KEY NOT NULL IDENTITY(1, 1),
TestData varchar(max) NOT NULL
)
go
-- the data:
insert into TestData(TestData) values('book')
insert into TestData(TestData) values('article')

Ok, so I create a full-text index on this table/data, then modify my
thesaurus file (tsEnu.xml) to this.
<XML ID="Microsoft Search Thesaurus">
<expansion>
<sub>book</sub>
<sub>article</sub>
</expansion>
</XML>

Then I re-start the Sql Server and Sql Full text services. Then I issue
the following query:
select * from ContainsTable(dbo.TestData, *, 'FORMSOF(THESAURUS, book)')

and it returns ONLY the key and rank of the row with 'book' in it. Using
FileMon from sysinternals, I can see that the tsEnu.xml and tsGlobal.xml
are queried by the msftesql.exe process (upon running the query) making
me think they should be working.

I have tried many combinations of the data, query syntax (like adding
dbl-quotes around book etc.) but there is no result of the expanded (or
in the cases I tried it a replacement).

Can someone offer some insight into how to troubleshoot this?

Thanks!
Richard Lowe





.



Relevant Pages

  • Re: A SQL GUI that can handle Everything
    ... I hadn't checked in a while for an update to Textpad. ... Another shortcoming is that TextPad does not have full Unicode support. ... It can read a Unicode file, but it cannot handle characters outside ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Server 2005 Opening Script File Problem
    ... through Mgmt Studio and then went back and made some changes in Textpad ... The default format for saving in Mgmt Studio is Unicode, ... SQL Server Management Studio on the other hand saves in Unicode by default. ...
    (comp.databases.ms-sqlserver)
  • Re: a simple sql question
    ... Love TextPad and have been using it for a LONG time!! ... SQL Server MVP ... It's simply a better text editor. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)
  • Re: SQL Server 2005 Opening Script File Problem
    ... through Mgmt Studio and then went back and made some changes in Textpad ... The default format for saving in Mgmt Studio is Unicode, ... SQL Server Management Studio on the other hand saves in Unicode by default. ... Guess what happens if there is some Chinese or Russian ...
    (comp.databases.ms-sqlserver)
  • Re: SQL Server 2005 Opening Script File Problem
    ... There is no reason to blame Microsoft for third-party product throwing ... a half-hearted Unicode support like Textpad. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)

Loading