View Full Version : PHP and Mysql search engine

02-26-2003, 07:45 AM
i am going to write a search engine for my website in PHP and Mysql...anyone know a good start for me to delve into? The search will be like the one in this forum...

02-26-2003, 09:29 AM
There are some good open-source forums written in PHP. You could take a look at the code of their search engines as a first guideline. Aside from that, grab the MySQL manual and read the chapters about LIKE, REGEXP, and FULLTEXT indices. The communication between user and search engine, done by PHP, is the easier part (basically you just need a form submission script). The trickiest part is to include things like an OR/AND search, and to sort your search results by relevancy. That might include selecting a broader result set with SQL and filtering that with PHP, before returning an ordered result set to the user.