Re: Search Engine with MySQL

From: Date: Wed, 26 Jan 2005 00:46:02 +0000
Subject: Re: Search Engine with MySQL
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-207337@lists.php.net to get a copy of this message
Phillip S. Baker wrote: > Greetings all, > > I just serached the records and found this topic. > This nearly answers my question but not completely. > > I have a search field and a class that I found that will explode queries > into an array based on boolean values and such. > Which is great so I get all the words a person is searching on and in what > way. > > However I am not clear on the best way to query MySQL. > > I want to search over four fields in 2 different tables. > Based on what I read below there is an easy way to do with with MySQL but > I > am not familiar with it. > Can someone enlighten me on this, it sounds just like what I need. You could... Create a new table which smushes all the fields into one big field, and then has IDs back to the original records, and then use fulltext index on that new table. Use fulltext index on each field separately and sort/merge results in your query. There's no Magic Bullet (that I know of) for MySQL to do it though. -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#207337) next »