need suggestion for search operation...

hi,
i got a website with MySql DB and i want to create a search option that will search all the DB for the wanted keywords...

i thought of doing simply an sql SELECT that will run on all the DB's tables and search for the wanted keywords...

i got a feeling that there is a better way, more elegant and useful way to do this kind of search. do you have any suggestions for this matter?

thanks in advance,
Avi.
[448 byte] By [AviLaviad] at [2007-11-19 1:33:38]
# 1 Re: need suggestion for search operation...
This is how I do it in SQL Server 2K, not sure about MySql just getting into that myself.

SELECT [databasetext] FROM [mydatabase] WHERE [searchtext] LIKE %databasetext%

You could also do a stored procedure that will accept a param and pass the text to search for to it.
Vanaj at 2007-11-9 13:38:42 >
# 2 Re: need suggestion for search operation...
10x man...
do u know where can i find list ofkeyword that the search won't support,
something like "is,as,with,am etc..."

?
AviLaviad at 2007-11-9 13:39:41 >
# 3 Re: need suggestion for search operation...
There is online doc's at the MySql website.

When you search with a WHERE statement you can use LIKE and a wildcard "%" at the beginning or end or both of the text you are searching for or you can us a statement to find the exact thing. "WHERE [searchtext] = [databasetext]" to get an exact match. Other than that I'm sure there is a list of SQL syntax on the MySql website.
Vanaj at 2007-11-9 13:40:50 >
# 4 Re: need suggestion for search operation...
i think i didnt made my self clear,
i ment to ask if us there any list of actual keywords, regular words, that i can use to to banned from my search.
like google for instance, if you enter "how mysql work with my program" - the words "my" and "with" will be banned from the keywords search.
so i wanted to know if there's known list of this kind of words...

did i made myself clear?
AviLaviad at 2007-11-9 13:41:43 >
# 5 Re: need suggestion for search operation...
As far as I know it will search for anything and not discard words as Google does.
Vanaj at 2007-11-9 13:42:52 >
# 6 Re: need suggestion for search operation...
Hi,

MySQL does not give you thatkind of feature, but you can use a small table to handle the drop the useless keyword from the string, before building the statement.

Google is using a "fuzzy" indexing feature, that allows its engine to give you the usual option "did you mean..." whenever you specify a wrong word.
The indexes are based on couple of characters, like MoDiFiCaTiOn, MD, oi, FC, ia, TO, io, andso on...

This cannot be done with MySQL, but you can directly interact with Barkeley, that is the MySQL engine layer, and build your own index searching & handling routines, and MySQL will get advantage of it, without knowing...

Bye.
elsapo at 2007-11-9 13:43:51 >
# 7 Re: need suggestion for search operation...
thanks man, i appriciate that.
Avi.
AviLaviad at 2007-11-9 13:44:55 >
# 8 Re: need suggestion for search operation...
Hi
I think that using LIKE in this case will make the performance awful
You need to use a fulltext indexing..
I did not try it in MySQL in fact .. But it made really great performance gain in SQL Server 2000
hspc at 2007-11-9 13:45:47 >