2012年3月22日星期四

FULL TEXT SEARCH FAIL

well,
I had previous disscussions with john regarding the Full Text Failier with ignore words and he suggested to clean the data first before appying full text search and I have done that, it was breaking on where only ',' or '(' or ')' etc were in the field,
and was not breaking if there is any Numerical or alphabatical charactor is with them like 'A(' or ')1' etc was warking fine. so I have written an other procedure to clean the data and now it starts working until it found 'B.F.P.O 117' during full text se
arch, my cleansing procedure is removing all those rows where is some data in field without any Alphabatical or numerical charactor.
code is below
SET QUOTED_IDENTIFIER OFF
declare @.vTemp as varchar(22)
declare @.vTemp1 as varchar(60)
declare @.vTemp2 as varchar(12)
set @.vTemp2 = '"B.F.P.O 117"'
set @.vTemp1 = 'Head Teacher'
set @.vTemp = 'W Thomas'
SELECT * From contactTemp
where
--DIFFERENCE(fullname, @.vTemp) = 4
--and
--DIFFERENCE(address, '14 Marchmont Rd') = 4
freetext(full_name,@.vTemp)
and
freetext(Address,@.vTemp1)
AND contains(zip , @.vTemp2 )
well, now if i remove 7 from 'B.F.P.O 117' or I remove the space like 'B.F.P.O117' it works, i dont understand y this is happening
any idea will be much appriciated.
Ahsan
Ahsan,
I can undestand why it working when you remove sapce between 'B.F.P.O 117'.
That is because it thinks B.F.P.O as one word and 117 as other word and
probably thinks 117 being just a number is a ignored word.
BTW, what exact server is saying - "Query contains ignored words?"
"Ahsan" wrote:

> well,
> I had previous disscussions with john regarding the Full Text Failier with ignore words and he suggested to clean the data first before appying full text search and I have done that, it was breaking on where only ',' or '(' or ')' etc were in the field
, and was not breaking if there is any Numerical or alphabatical charactor is with them like 'A(' or ')1' etc was warking fine. so I have written an other procedure to clean the data and now it starts working until it found 'B.F.P.O 117' during full text
search, my cleansing procedure is removing all those rows where is some data in field without any Alphabatical or numerical charactor.
>
> code is below
> SET QUOTED_IDENTIFIER OFF
> declare @.vTemp as varchar(22)
> declare @.vTemp1 as varchar(60)
> declare @.vTemp2 as varchar(12)
> set @.vTemp2 = '"B.F.P.O 117"'
> set @.vTemp1 = 'Head Teacher'
> set @.vTemp = 'W Thomas'
>
> SELECT * From contactTemp
> where
> --DIFFERENCE(fullname, @.vTemp) = 4
> --and
> --DIFFERENCE(address, '14 Marchmont Rd') = 4
> freetext(full_name,@.vTemp)
> and
> freetext(Address,@.vTemp1)
> AND contains(zip , @.vTemp2 )
>
> well, now if i remove 7 from 'B.F.P.O 117' or I remove the space like 'B.F.P.O117' it works, i dont understand y this is happening
> any idea will be much appriciated.
> Ahsan
>

没有评论:

发表评论