||SWISH-E: Simple Keyword Index and Search Engine - Enhanced
A convenient method to allow clients to retrieve information
from a web site is by building an index of the web pages and
providing search capability. This may seem like a daunting
task, but with a few tools this task becomes very easy.
Normally web indexing and searching
requires a complex, hard to use and install WAIS-based solution,
however a small yet powerful program SWISH-E,
(which is based on SWISH written by Kevin Hughes), can be
used to fulfill your web indexing and searching needs.
To install SWISH-E on your Virtual Server, connect via Telnet
or SSH and run this command:
% vinstall swish-e
Swish-e requires the Perl
LWP module to run.
To use SWISH-E, do the following.
a SWISH-E configuration file for your Virtual Server.
You may copy or edit the following sample configuration
files to meet your needs, according to your Virtual Server
sure you change all occurrences of
in the files to match the login name of your Virtual Server.
Other modifications may also be necessary. You should
become familiar with the
FileRule s section
of the configuration file. By default, SWISH-E will not
index files in directories containing a .htaccess
file. If you have a directory that contains a .htaccess
file, and would like it indexed, then comment out that
FileRules line by placing a "
as the f irst character in the line.
Create a separate configuration file for each search
on your Virtual Server. For example, if you have
several users on your server that require separate
searches for their own directories, create a separate
configuration file for each user. Then use the configuration
files to create separate index files for each search.
create a Web site index, run the swish-e program
like this, depending on your Virtual Server O/S (and substituting
the name of your SWISH-E configuration file you created
in the previous step for
you run the SWISH-E executable, a SWISH-E index file will
be generated. The name of the SWISH-E index file is that
which you specified as the value for the IndexFile variable
in the SWISH-E configuration file.
||The Search Form
To install the search on your web site you will need to download
the Search Form and store
it somewhere in your usr/local/etc/httpd/htdocs directory
structure. Feel free to customize the form, add graphics,
etc. But be sure that the variable name for each input
field is not altered.
can be customized for your Virtual Private Servers by simply
changing the occurrence of
to the name of the swish-e index which you specified as the
value for the
IndexFile variable in the SWISH-E
configuration file. You may hide the
field by simply using a
||The Search CGI
The CGI script is installed into your www/cgi-bin/ directory with the name search.pl.sample. You will need to
change the filename to search.pl and make it executable. From the
SSH or Telnet prompt, run the following commands:
You can customize the appearance of the search CGI, if you wish.
% mv search.pl.sample search.pl
% chmod 655 search.pl
Two subroutines in the ~/www/cgi-bin/search.pl
print_footer are used to print
out header and footer information. You can find these by searching for
the string MODIFY ME in the script. You can then insert whatever HTML you want between the line print <<_HTML_; and
free to modify these functions such that the CGI outputs pages
that are in synch with the motifs of the rest of your site.
For more information and documentation see:|
Toll Free 1-866-GSP-4400 • 1-301-464-9363 • firstname.lastname@example.org
Copyright © 1994-2016 GSP Services, Inc.