Skip to main content.
home | support | download

Back to List Archive

Re: and switches (-x, -b, -m etc.)

From: Bill Moseley <moseley(at)>
Date: Wed Jan 30 2002 - 19:45:01 GMT
At 11:24 AM 01/30/02 -0800, Gordon Jessop wrote:
>Poured over the documentation and was unable to find any information about
>passing search switches to swish via (say that 3 times fast).
>Am I to assume that, in order to get the functionality of the switches (-x
>for StoreDescription, -b and -m for paging etc.)

It's a library interface, so you should not need any of those switches.
There's SwishSeek(handle,number) which is like -b, and SwishNext(handle)
which you call -m times.  You don't need -x since you pass in the
properties you want back, and it's up to you to format them as needed.

Take a look at perl/  I don't think it does a seek, but it has some
example of using the library.

> I'm going to have to forgo
>the use of SWISHE (and its alleged performance benefits) and roll my own
>command line call?

Or use the swish.cgi script (or copy the code that's in there).  There's
also the SWISH modules on CPAN which provides an abstraction layer to call
swish (the idea is the same API is used for both forking swish and for
using the C library).  But I'm sure those modules are out of date with
current dev version.

As for "alleged performance benefits":  I really think that forking is
really fast enough these days.  Unless you are doing 100 requests per
second you probably will be fine forking.  I bench marked the difference
one time (using Apache/mod_perl with forking vs. the library, and it wasn't
a huge difference.  If you use my highlighting code then there's where the
speed really stinks.

Bill Moseley
Received on Wed Jan 30 19:45:36 2002