laziness, impatience, and hubris | |
PerlMonks |
Re: Building a search engineby meetraz (Hermit) |
on Nov 13, 2003 at 16:16 UTC ( [id://306827]=note: print w/replies, xml ) | Need Help?? |
Do you have access to a database? One way to build a search engine would be to write an indexing script that pulls keywords out of your HTML files and puts them into a database, such as MySQL or SQLite. When a user searched for something, you would just use a database query. On the other hand, if you don't have access to a database, you could try parsing through all files using File::Find and a regexp... or you could build a text-based index to avoid going through all files. The answer will really depend on how many HTML files you have, how often they change, how much traffic you get, what kind of searches you want to use, and what kind of performance you need. Can you provide more information on what you're looking for ?
In Section
Seekers of Perl Wisdom
|
|