Making A Searchable Site


Integrating the Search Interface into your Site

Now that you've set up an archive and configured your domain, you are ready to build your archive indexes and integrate them into your site.

Highlight the archive that you configured and click the "Manage" button. The status message should now say 'Ready to build index'.

There are a few more options on the page that you can optionally select:

At this point, you can simply press the 'Build Index' button in the lower part of the screen. The archive will build in the background. You can click the "Update Status" link or reload the page until the 'Last Built...' message appears with the number of files indexed.

Searching and Testing your Archive
From the 'Manage Archive' screen, you can press the 'Search Archive' button to search your archive. This will launch the search form where you can do some keyword testing.

You can also enter 'http://yourdomain.com/cgi/path/to/webglimpse.cgi' into your browser to generate a default search form automatically!

Some instructional comments can be found in the 'view source' of the search form and as a general rule, if you view the source of any config file we've tried to put useful comments there.

Integrating the Search Boxes into your Existing Pages
Clicking the "Add a search box or page to your website" link at the bottom of the 'Manage Archive' screen will give you form samples and the exact codes you need to cut and paste into your website in order to add search capabilities to this particular archive. It will also tell you the exact locations on your server where the sample search forms reside. You may edit those forms in any way you desire, simply preserve the FORM tag and the names of the input tags. The types of form examples that are automatically generated are listed below:

Setting Up Regular Reindexing

Now that you have successfully set up an archive, how will you keep it up to date? You can manually build your archives as you did the first time, but to make it easier, you can click the "Reindex automatically from your crontab" link at the bottom of the 'Manage Archive' screen. A screen will be displayed giving you the exact command syntax to reindex your archive from your unix/linux cron. Note: Clicking this link will not place an entry into your cron file as that would create a security risk, it will only display the exact syntax for you to copy into your crontab manually. If you are not familiar with using the unix/linux cron file, you can use the MAN pages in your system for more information.

It is important to also note that the crontab may run as a different user than the web user. For this reason you may have to choose between ALWAYS reindexing via cron or ALWAYS reindexing via the web interface. You may also have to change the ownership/permissions of the archive in order to run the indexing via your crontab.