Search module

Document root Search Engine Support

Overview
The Search modules provides simple document indexing and searching facilities for your web site. It is not intended as a replacement for dedicated indexing software, however it does provide fast and efficient search capabilities. The Search module generates an index of all the text documents in your document root, then uses the index to fulfill search requests.

Configuration
To configure the search module you need specify a URL for accepting searches and a location in the for the Index file. The URL will be used to submit queries to the search module. The index file can be stored anywhere that is convenient, providing it can be read by the user id which the web server runs.

After you enable the Search module you will need to generate an index file for you document root. This is currently achieved by running a command line program. You will need to regenerate the index file each time you modify your document root. The command line program can be installed on a UNIX crontab to automate this process. The index program can be run as follows:

$ZEUSHOME/web/bin/searchindex virtual-server-name
Where virtual-server-name is the name of the virtual server to index, and $ZEUSHOME is the installation directory Zeus Server.

Advanced usage
   searchindex <virtual server name> [regex]
   searchindex <virtual server name> <docroot> <outputfile> [regex]
The latter form allows for multiple search indexes per website.
The regex, if supplied, is an extended regular expression specifying which filenames to skip.
  e.g. searchindex mysite "(/[Ff]rench/|/private/|\.fhtml$)"
If <virtual server name> is "-", the configuration file for the virtual server is read from stdin instead of looking for the it in the $ZEUSHOME/web/runningsites/ directory.

This allows searchindex to be run on an arbitrary machine (instead of the webserver). It also allows the searchindex program to index a non-running website. The master copy of config files of running websites live on the adminserver machine in the $ZEUSHOME/webadmin/conf/runningsites/ directory; the config files for non-running websites live in $ZEUSHOME/webadmin/conf/sites/ on the same machine.

Searches can be performed by accessing the URL specified, or by including the following form details in your own search page.

<form method=GET action="/search"> Query: <input type=text name=expr size=20> <input type=submit value=Search> </form>
The action attribute (set to "/search" in the above HTML) should be set to the URL you defined in the configuration page. The size value in the input field can be set to any convenient value