I'm trying to make a search engine using CONTAINSTABLE.
It works fine, but I had to make a "work-around" like follow...
1- user submit this string: "keyword1 keyword2 keyword3"
2- I split the string
3- I clean all keywords of just one letter or keywords that are boolean
value
4- FOR EACH "pretty-good" keywords I try to call a stored proc. that uses
CONTAINSTABLE
5- If it doesn't return a -2147217900 error (noise-world) I add that
keywords to a new variable
[if sp_check_noise(keyw) <> "-2147217900 " then stringOK = stringOK & "
AND " & keyw]
6- Some few function to make sure it's all correct
7- finally I run the query:
"SELECT id, name, t2.[RANK] from table as t1 INNER JOIN CONTAINSTABLE
(table , * , '"&stringOK&"') as t2 on t1.id = t2.[KEY] order by t2.[RANK],
t1.date_create DESC"
Even if it seems complicate it works pretty good..but....
I don't like steps 4-5 at all !! :(
Is there any other way to recognize a noise-world without calling that dummy
sp?
Thanks to all for your support. (If you can, please ask also to my private
Filippo
PS: I've already read msdn article at:
http://support.microsoft.com/support/kb/articles/Q246/8/00.ASP
but it's not exactly what I'm trying to do...