Want to add a search engine to your Web site but don't know how? Well, today's your lucky day! In this tutorial, find out how to obtain, install and use the popular ht://Dig indexing engine to add powerful, effective search capabilities to your site with minimal time and fuss.
You can also alter a number of other variables that control ht://Dig behaviour through the configuration file. Amongst other things, you can modify the location for the search database, specify a list of URLs and extensions to be bypassed while indexing, enable or disable the fuzzy logic algorithms, limit the amount of content stored in the search database and control the maximum amount of data read over an HTTP connection.
The next step is to actually build the search database. As noted previously, when indexing a Web site, ht://Dig recursively spiders the site(s) and builds an index of all the unique words it finds. This process is activated via the "rundig" script, found in the installation's "bin" directory:
The "rundig" script looks up the configuration file to figure out which URL to use as the root for indexing, and begins traversing and scanning the pages under that URL.
Once it's done, the search database will have been created (in the installation's "db" directory) and is ready for use. The next step is to integrate the ht://Dig search form and form processor into the Web site.