Skip to main content.
home | support | download

Back to List Archive

Re: 2.4, SWISH API and maxhits

From: Del Kimbler <kimbler(at)not-real.ces.clemson.edu>
Date: Fri Sep 03 2004 - 14:52:49 GMT
Thanks very much, Bill and Peter,

I did miss that concept.  My (lack of) understanding was that -m stopped 
the search at that point, not stopping to think how that might complicate a 
rank/relevance calculation and perhaps other aspects.

I appreciate your quick help with a easy solution.

Del

At 10:34 PM 9/2/2004, you wrote:
>On Thu, Sep 02, 2004 at 06:05:29PM -0700, Del Kimbler wrote:
> > No, Hits below I understand to be all hits resulting from the search.  The
> > -m parameter on the command line is the maximum number of hits to
> > return.  If one could set maxhits (-m), that would be an upper bound for
> > Hits.  I am trying to find a way, using cgi and SWISH::API, to limit the
> > number of hits as I did in earlier versions.  I believe I could in this
> > version as well, if I used the forking version of a perl script, but that
> > has problems of its own.
>
>Maybe you are missing this concept:
>
>-m limits how many results are printed.  Not how many results are
>found.
>
>The command
>
>     swish-e -w foo -m 2
>
>still finds all 23,211 results for -w foo, but only prints the first
>two.  If you want to start at some offset you use -b:
>
>    swish-e -w foo -m 2 -b 1000
>
>which prints two results starting at 1000.
>
>With Swish::API you use $results->SeekResult() for -b and then for -m
>you just only call $results->NextResult the number of times you want.
>
>The above would be:
>
>    $results->SwishSeek( 1000 - 1 );
>    for ( 1..2 ) {
>      my $result = $results->NextResult;
>      [...]
>    }
>
>That help?
>
>--
>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

D. L. Kimbler, Ph.D., P.E.
Professor of Industrial Engineering
Clemson University
(864)656-5645  
Received on Fri Sep 3 07:53:01 2004