Skip to main content.
home | support | download

Back to List Archive

Re: default max results per screen

From: Bill Moseley <moseley(at)not-real.hank.org>
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.

   http://swish-e.org/docs/search.cgi.html

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

-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Mon Apr 25 08:01:07 2005