OUT OF DATE: please see: New Directory-Based Searching with wgall.html

Setting up Directory-Based Searching

How to set up Webglimpse to allow your search page to offer searches on the entire site or just on specific sections (directories).

By default, Webglimpse is invoked from your web via some HTML like

<FORM method=get ACTION="/cgi-bin/webglimpse/path/to/archive">

where the program being called is /cgi-bin/webglimpse. The additional  portion of the string (/path/to/archive) is stored by the web server in the PATH_INFO environment variable. Webglimpse uses this as the starting  point when looking for the archive information to perform the search.

This path is generated automatically based on the directory in which you ran wgreindex (look at the form inside wgall.html). Webglimpse provides a nice way to override PATH_INFO however, and that's by specifying a form element that is named pathinfo (lower case necessary).

To allow searching of multiple directories you can write HTML like the following:

Select the section that you wish to search
<SELECT NAME="pathinfo">
<OPTION VALUE="/usr/share/glimpsedata/">Entire Site
<OPTION VALUE="/usr/share/glimpsedata/faq">FAQ
<OPTION VALUE="/usr/share/glimpsedata/archives">Archives
</SELECT>

What I've done here is create a set of directories under /usr/share called glimpsedata which mimics the directory structure of the web site that I am indexing. Note that you don't have to do it this way. You may wish to do all of your archiving within the directories of the web site, or you may wish to choose different names (though this might get very confusing).

Now what you do is go into each directory and run confarc and set up directory based archiving and create individual archives for each  directory. Running confarc from /usr/share/glimpsedata on the root directory
of the web site gives you the search capabilities for the entire site while running confarc from one of the subdirectories gives you the ability to  search just that part of the tree. That's all there is to it.

Mike Kay (mkay@spc.noaa.gov)
7/20/99
 


Docs and Howtos