search engine with containstable

search engine with containstable

Post by Filipp » Fri, 08 Jun 2001 22:06:17



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...

 
 
 

1. search engine with containstable

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...

2. Terminate sql script?

3. Big problem with accessing a foxpro database from a COM object

4. search engine using containstable

5. Thin client for Java to MS SQL Server

6. CONTAINSTABLE & Searching Numbers

7. Transfer Login in SQL 65.

8. CONTAINSTABLE and FORMSOF Generation_term search problem

9. developing search tool using CONTAINS/CONTAINSTABLE

10. Full Text Searching 2 Tables at once using CONTAINSTABLE

11. CONTAINSTABLE with an apostrophe in the search condition

12. CONTAINSTABLE for web searches