Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unexpected result in Full text Search in Multi languages Expand / Collapse
Author
Message
Posted Wednesday, April 17, 2013 9:10 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, November 28, 2014 8:19 AM
Points: 10, Visits: 78
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
Post #1443329
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse