Skip to main content.
home | support | download

Back to List Archive

Re: Getting older .cgi scripts to work with

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Sun Jun 02 2002 - 15:17:42 GMT
At 06:37 AM 06/02/02 -0700, Andrew Lord wrote:
>I have been using swish-e 2.0.5 for some time and love it.  However I would 
>like to move to swish-e-2.1-dev-25 in order to use its prog function and its 
>capacity to index .php pages.  I'm having trouble getting swish-e-2.1-dev-25 
>to work in conjunction with some cgi scripts.

The debugging option -D option has been replaced.  -D would dump the entire
index in a rather cryptic format.  He's using that switch to grep out the
words in the index.

There's much easier and faster ways to do that now.  If you want all the
words that start with a given letter you can use the -k switch.  To show
all words in the index that start with "c" 

    ./swish-e -k c

and split on white space.

To dump all words in a nice list:

    ./swish-e -T index_words_only

The -T options are really debugging options and debugging options can
change over time.

Should be really easy to adjust the script's makewordlist() function to use
those features.  It would be a lot faster than parsing the entire index file.

You might want to adjust the script to start like:

  #!/usr/local/bin/perl -wT
  use strict;

That will catch potential errors in the script.


-- 
Bill Moseley
mailto:moseley@hank.org
Received on Sun Jun 2 15:21:14 2002