Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Unexpected result in Full text Search in Multi languages


Unexpected result in Full text Search in Multi languages

Author
Message
Jim88
Jim88
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 89
Hi All,
I have a full text search SP to search a field that contains English&French. But the result of the search was not expected. Is it because that contains multi languages. The catalog I defined in Language for Word Breaker was "Neutral". Here is my Full text search query below (SQL Server 2008 R2 -64bits)

Declare @sSearchString nvarchar(1000), @sLanguage varchar(30), @iRank int
set @sLanguage = 'Neutral'
set @iRank = 100

set @sSearchString = N'"Code de procédure civile"'


SELECT t1.test_id, t1.Rtn1, t1.Rtn2, t2.s_Name, t2.s_Address, t_Master.rank as Ranking
FROM test1_Master t1 Inner JOIN test2_Client t2
ON t1.test_id = t2.test_id
Inner JOIN test_Table3 t3
ON t2.legis_id = t3.legis_id
inner join FREETEXTTABLE (test1_Master, (Rtn1,Rtn2),@sSearchString, Language @sLanguage, @iRank) as t_Master
on t1.test_id = t_Master.[key]
where t1.Rtn1 is not NULL and t1.Rtn2 is not NULL
union all
SELECT t1.test_id, t1.Rtn1, t1.Rtn2, t2.s_Name, t2.s_Address, test_Address.rank as Ranking
FROM test1_Master t1 Inner JOIN test2_Client t2
ON t1.test_id = t2.test_id
Inner JOIN test_Table3 t3
ON t2.legis_id = t3.legis_id
inner join FREETEXTTABLE (test2_Client, (s_Name,s_Address),@sSearchString, Language @sLanguage, @iRank) as test_Address
on t1.test_id = test_Address.[key]
where t2.s_Name is not NULL and t2.s_Address is not NULL


if I changed the Language to English or French, the number of rows returned were different but was not able to predict what the returned results.

btw, I am new to Fulltext search programming. Hope the expert can give me some suggestion. Also I would like to have google search type of results. Can someone point out my error and would be great if you have some sample scripts. Thanks in Advance!

Jim
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search