A Simple Website Search Program
Just 224 Lines of Perl 5!Permission is given to use and modify these scripts as you see fit, as long as you acknowledge the source and link to this page.
We have made the scripts that are used to search our web server
freely available. The scripts are written in Perl 5.
must be installed as a CGI program in order to work, and
search-index must be run on a regular basis in order
search.cgi to produce useful results.
Perl 5 must be available on your web server and you must
know how to install CGI programs on it or get the help of
someone who does. CGI.pm must also be installed, which is usually
the case. It doesn't matter
what you have on your own computer.
This search script does not use a fancy indexing system, so it is not as fast or efficient as the big commercial search engines. However, it does use a simple but clever indexing approach that considerably reduces the amount of work to be done by the program on each search. If you have a very large site with many users searching constantly, you might not want to use it. If, on the other hand, your users search only occasionally (like ours), you'll find it very useful.
We cannot tell you how to install CGI programs on your web server. If you get server errors, read YOUR server's DOCUMENTATION. Don't send us email about it. Thanks!
After you download the source code, you need to edit it to suit your site. Mandatory settings are at the top.
search-indexon a regular basis, preferably from
cronor another automation facility. For a list of arguments, run
search-indexwithout specifying any arguments.