I am not able to activate thesaurus in SQL Server 2005. With some help I was able to use noise files but thesaurus is uphill. The following is my tsENU.xml file:
<XML ID="Microsoft Search Thesaurus">
<thesaurus xmlns="x-schema:tsSchema.xml">
<diacritics_sensitive>0</diacritics_sensitive>
<expansion>
<sub>ANTHONY</sub>
<sub>TONY</sub>
</expansion>
</thesaurus>
</XML>
All I want is, ANTHONY and TONY to be treated as synonymous.
The following is my query:
SELECT CONTACTID, FULLNAME
FROM CONTACT
WHERE CONTAINS (FULLNAME, ' FORMSOF (THESAURUS, TONY) ')
and
SELECT CONTACTID, FULLNAME
FROM CONTACT
WHERE FREETEXT (FULLNAME, 'TONY')
To no awail. Am I missing some thing here? Kindly help me to go thru this.
I even restarted the sqlftservice and recreated the index but to no use.
thanks and regards
SQLDBA123
Here is an example thesaurus file:
<XML ID="Microsoft Search Thesaurus">
<thesaurus xmlns="x-schema:tsSchema.xml">
<diacritics = false/>
<replacement>
<pat>W2K</pat>
<sub>Windows 2000</sub>
<sub>NT</sub>
</replacement>
<replacement>
<pat>Internet Explorer</pat>
<sub>IE</sub>
<sub>IE 5</sub>
</replacement>
<replacement>
<pat>Internet</pat>
<sub>intranet</sub>
</replacement>
<expansion>
<sub>run</sub>
<sub>jog</sub>
</expansion>
<replacement>
<pat>seek</pat>
<sub>went</sub>
</replacement>
</thesaurus>
</XML>
Please replace the corresponding thesaurus with this example and restart msftesql service. Now thesaurus should work. The problem is that the example in the thesaurus file is wrong on diacritics setting property.
thanks,
Jingwei
1 条评论:
Very impressive stuff. Thanks for sharing
1975 Chrysler Imperial AC Compressor
发表评论