Hi,
I have problem with Contains command . I've made index on FName column of my
database which is nvarchar(100).
When I call contains command to search for english strings , it works very
well .But when I search for unicode strings ( I use farsi strings and insert
them in unicode ), sometimes it can not find them , in more than 70 percent
unicode searches , it works correctly , but sometimes it can't find very
simple strings, for example : it can't find " ^??? " strings . I use
these commands to find :
Select * from MyDB where Contains(FName, N' ^??? ' )
or
Select * from MyDB where Contains(FName, ' ^??? ' )
but no one can find the string.
please tell me what is wrong in command or what can I do to solve this
problem.
In addition , I want to send result of Select @.@.version command for you .
Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows
NT 5.0 (Build 2195: Service Pack 4)
Also the Collation of Database and FName-field is :
SQL_Latin1_General_CP1_CI_AS
Thanks in Advance
Hamid.
Hamid,
First of all, thank you for providing the @.@.version (SQL Server 2000 SP3 on
Windows 2000 Server SP4) information along with the language (Farsi -
Iranian / Persian) and an example of your CONTAINS queries as this is most
helpful in helping you solve this problem!
Unfortunately, Farsi is not one of the subset of SQL Server 2000 supported
languages that Full Text Search supports, see SQL Server 2000 Books Online
title "Column-Level Linguistic Analysis", Note that it states that you
should "Use neutral when a column contains data in multiple languages or in
an unsupported language". Most likely, you have the FName column's "Language
for Word Breaker" set to US English. Could you confirm this with your reply
via sp_help_fulltext_columns ?
Assuming that you have your FT-enable column (FName) "Language for Word
Breaker" set to US English, you should drop the FT Catalog and re-create it
with the "Language for Word Breaker" set to Neutral and then run a Full
Population and re-test your CONTAINS query.
Additionally, you might want to checkout the new "Microsoft Arabic
Word-Breaker (Arabic Search Engine) - Beta" at
http://www.microsoft.com/middleeast/...v/beta/search/ and download the
Installation Guide and the Microsoft Arabic Word-Breaker. Now, I am not a
linguist, and I do not know how close or far apart Farsi or Persian is from
Arabic, but I'd suggest that you test it and let this newsgroup know if you
find it effective in resolving your FTS issues with Farsi strings.
Hope that helps!
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Hamid" <hamid@.omid.ca> wrote in message
news:e5Z4#hsJFHA.3928@.TK2MSFTNGP09.phx.gbl...
> Hi,
> I have problem with Contains command . I've made index on FName column of
my
> database which is nvarchar(100).
> When I call contains command to search for english strings , it works very
> well .But when I search for unicode strings ( I use farsi strings and
insert
> them in unicode ), sometimes it can not find them , in more than 70
percent
> unicode searches , it works correctly , but sometimes it can't find very
> simple strings, for example : it can't find " ^??? " strings . I use
> these commands to find :
> Select * from MyDB where Contains(FName, N' ^??? ' )
> or
> Select * from MyDB where Contains(FName, ' ^??? ' )
> but no one can find the string.
> please tell me what is wrong in command or what can I do to solve this
> problem.
> In addition , I want to send result of Select @.@.version command for you
..
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on
Windows
> NT 5.0 (Build 2195: Service Pack 4)
> ----
> Also the Collation of Database and FName-field is :
> SQL_Latin1_General_CP1_CI_AS
> Thanks in Advance
> Hamid.
>
>
No comments:
Post a Comment