Tuesday, March 20, 2012

Problem with Full Index Search

I have implemented Full Text Search for my MSSQL Database and got stuck with this problem:

When i try to search for the exact word 'Function 1' using the CONTAINS keyword, the query retrieving the following results too...

1. Function 1
2. Function 2
3. Function 3
4. Function 4

Where i want the first answer alone. But it works good with the strings (ex: Broken Wire) where both are strings.

Wont it work with the text which is a combination of a string and a number like 'Function 1'

Kindly guide me!!

Mumbaimacroothis is the query i have used

select distinct dStep2.DFMEA_NO REGNO,dStep2.ID,dStep3.Step2_ID,dStep3.FUNC_DESC DESCRIPTION from
FMEA_DFMEA_STEP2 dStep2, FMEA_DFMEA_STEP3 dStep3 WHERE dStep2.ID=dStep3.Step2_ID
AND CONTAINS(dStep3.FUNC_DESC, '"function 1"')

help to do a search for character + number combination|||Try this:

select distinct dStep2.DFMEA_NO REGNO,dStep2.ID,dStep3.Step2_ID,dStep3.FUNC_DESC DESCRIPTION from
FMEA_DFMEA_STEP2 dStep2, FMEA_DFMEA_STEP3 dStep3 WHERE dStep2.ID=dStep3.Step2_ID
AND dStep3.FUNC_DESC like '%function 1%'

No comments:

Post a Comment