Forum Moderators: coopster
SELECT * FROM $sql_tbl WHERE * LIKE $search
or
SELECT * FROM $sql_tbl WHERE *=$search
any "legal" way to accomplish this without specifying all the fields?
In the end, I have just stacked about 25 OR statements... doesn't seem to hurt speed too much...
coopster thanks for your idea, it seems to be a start for my quest for some starting code for a php google-like parser for a search form (meaning quotes and boolean logic) My mind is short-circuiting with the number of possibilities I have to go through to code something really functional.
Tricks it think in a different way... you donT' search documents, you search words in a word table, then you have a link table tellign you which documents match with the words you found... The wrod table grows much slower then the document table (for large systems). Especially if stemmed. I use the double metaphone algorithm to increase reach, but use a ranking system to maintain relevancy and accuracy.
There is a lot of really interesting research available on CiteSeer on large scale document retrieval.
In the end it depends if you're geeky to blow a week on developign a powerfull search system for a potentially small application, jsut cos it's really interesting ;)
I know I am.
SN
I use the same method as killroy, a "word hits" table, if you want ot get fancy you can store the word position, or have more granularity and split by sentence etc.
I ran a script to loop through an INSERT statement until there were around 5,000,000 word hits, searching it was no prob at all.