Skip to main content.
home | support | download

Back to List Archive

Re: default max results per screen

From: Bill Moseley <moseley(at)>
Date: Mon Apr 25 2005 - 15:01:02 GMT
On Mon, Apr 25, 2005 at 06:47:33AM -0700, Andy McKell, FOCUS Internet wrote:
> The default maximum number of results per screen is 15 and this appears to 
> be imported in $template_params.
> Where is this default value set - and by implication, can it be changed?

At the top of swish.cgi is a perl hash.  In that you will see:

    page_size => 15,

You can also use a configuration file which is called .swishcgi.conf
by default.  That is also just a perl hash and the default config (in
the swish.cgi) is *merged* with .swishcgi.conf.

So if you create .swishcgi.conf that looks like this:

    return {
        page_size => 20,

That will replace the default setting.

Now, if you are just starting out I would recommend you look at
the other example script called "search.cgi" (same place that
swish.cgi is found).  It doesn't have all the configuration options
that swish.cgi has, but I think that is a feature.

It requires more Perl knowledge, but it should be reasonably easy to
get going if you follow the example in the docs.

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Mon Apr 25 08:01:07 2005