Building a site search engine

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Building a site search engine

Post by kendall »

Hey,

I am developing a website in which i have both static and dyanmic pages (mysql data). I want to build a general site search that encompasses search both the static and database for search terms.

I have heard about a site index process but I had no luck finding out EXACTLY how to put this to use for my situation.

Can some one clear the air here....

do you no of any good tuts out there pertaining to what i want to do?

Kendall
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

mysql has a built in searching feature for fulltext fields, you need to build an "index" table that you will search on, write a script to copy the content of all your pages into the table and let mysql do all the work. This is probably the easiest way, you can google for mysql fulltext search for helpfull tutorials, or read the official mysql documentation
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

jshpro2 wrote:mysql has a built in searching feature for fulltext fields, you need to build an "index" table that you will search on, write a script to copy the content of all your pages into the table and let mysql do all the work. This is probably the easiest way, you can google for mysql fulltext search for helpfull tutorials, or read the official mysql documentation
Thats a pretty smart idea. Anyone have script that does that?
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Post by matthijs »

Just last week I found this article from Cal Henderson about searching with php and mysql. Might be of interest.
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Post by kendall »

jshpro2 wrote:mysql has a built in searching feature for fulltext fields, you need to build an "index" table that you will search on, write a script to copy the content of all your pages into the table and let mysql do all the work. This is probably the easiest way, you can google for mysql fulltext search for helpfull tutorials, or read the official mysql documentation
actually i know about full text searching. For the fields i want to search that containt descriptive content i have a fulltext search index on it. Searching the database like that is not a problem but these fields/ columns are product information and not really any keyword seeded content specfic for site searching. Its not like its and index of the site. Then the static pages are php but thier content is hardcoded. I didnt see the need to pt that in a table really. So i wanted a search site script that will search both the web pages as well as the database fields.

I was scouring through the web and found a ht//Dig software. Has anyone ever used it in relation to searching both files and databases?

KEndall
Post Reply