May 28, 2008 at 10:22 am
I am new in SQL SERVER, working on SQL SERVER 2005 I have a requirement to do nth level fulltext search into result set of a fulltext query.
What is the requirement?
I have a textbox to get search keyword and a check box of SEARCH WITHIN RESULT or NEW SEARCH and a button of search.
User first search for a new query for KEYWORD1 and got a result set, then he check the SEARCH WITHIN RESULT and enter KEYWORD2 into textbox, he want to search into the result set of KEYWORD1 and get the second result set for KEYWORD2 that is actually a sub set of first result set, he want another SEARCH WITHIN RESULT for KEYWORD3 that would be the third result set and sub set of second result set of KEYWORD2. It would run until user has not enough record to search.
My Query
I write a query for that purpose but it just get result set for second level, for third and forth level it fails.
SELECT FT_MashupMetaInfo.*,
KEY_TBL.RANK
FROM MashupMetaInfo AS FT_MashupMetaInfo
INNER JOIN FREETEXTTABLE(MashupMetaInfo, *,
'FORMSOF (INFLECTIONAL,"New Mashup" )') AS KEY_TBL
ON FT_MashupMetaInfo.ID = KEY_TBL.
WHERE Contains(CategoryName,'ARTS')
AND Contains(Tags,'"Mashup"')
AND freetext((Title,Description),'FORMSOF (INFLECTIONAL, "adi great" OR "Video")')
ORDER BY KEY_TBL.RANK DESC
Help Me
Can some Experts Help me
May 28, 2008 at 8:04 pm
you just need to append the new keyword(s) to the existing criteria.
first pass:
AND freetext((Title,Description),'FORMSOF (INFLECTIONAL, "adi great" OR "Video")')
next pass:
AND freetext((Title,Description),'FORMSOF (INFLECTIONAL, "adi great" OR "Video" OR "night life")')
June 2, 2008 at 4:56 am
Unfortunately its not working in my scenario
June 2, 2008 at 4:58 am
either i writing this
AND freetext((Title,Description),'FORMSOF (INFLECTIONAL, "adi great" OR "Video" OR "night life")')
or
AND freetext((Title,Description),'FORMSOF (INFLECTIONAL, "adi great" AND "Video" AND "night life")')
returns same result
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply