-
All the documents you wish to index in a given
collection must be underneath your ~/Public/html
directory in IFS. They need not all be contained in
the same directory.
-
Using a text editor, you need to create a swish
configuration file, which describes the location of
documents you wish to index, filenames to exclude from
indexing, and other options. You should read the section in the swish
documentation on indexing. Additionally, this sample swish configuration
file may be helpful.
If you need help with UNIX text editors, refer to
ITD's QuickNotes
Using
the Unix Text Editor vi and
Using
the Unix Text Editor pico.
If you use pico, invoke pico with the -w
flag (pico -w) - this turns off
word wrapping which, while useful in composing email
messages, causes problems with the swish configuration
files. If you receive a message that swish has
generated a segmentation fault while trying to build
your index file, make sure that the line breaks fall in
the proper places (one rule per line, line breaks at
the end of each rule, and no line breaks before the end
of a rule).
-
Once you've constructed the swish configuration file,
you need to index the files. Log into the ITD login
service and run the command
swish -c config-file
where config-file is the
name of the swish configuration file you created in step 2.
-
Now that your collection is indexed, you can search it
using Swishgate. First, you need to create an HTML form
for searching. You should probably start with the swishgate
generic sample form (save it and modify it to your
liking).
-
In your form, include the following:
<form method="post"
action="/cgi-bin/swishgate/~uniqname/index.swish">
where uniqname is
replaced with your uniqname, and index.swish is replaced with
the path to your swish index file (the same as the
IndexFile directive in your
swish.conf file).
This path is relative to your
~/Public/html
directory. For example, if your
index.swish file is in
~/Public/html/blah/index.swish,
then the form action would look like this:
<form method="post" action="/cgi-bin/swishgate/~uniqname/blah/index.swish">
(bold used for emphasis)
|