X-Git-Url: http://git.rot13.org/?p=webpac2;a=blobdiff_plain;f=vhost%2Fwebpac2.cgi;h=b0a919e612ff72eb5c439a9d228217ad4d3142c9;hp=79adc7dfcfb1860a4c09789dec7fd838cb249c0a;hb=1e7a16c26425530046b86a6d11b9795bb5d88926;hpb=7691c27aed597d2d44dfecac8756c80602500868 diff --git a/vhost/webpac2.cgi b/vhost/webpac2.cgi index 79adc7d..b0a919e 100755 --- a/vhost/webpac2.cgi +++ b/vhost/webpac2.cgi @@ -218,6 +218,8 @@ if ( my $search = param('search') ) { $pager->total_entries( $swish_results->hits ); + $swish_results->seek_result( $pager->first ); + if ( ! $pager->total_entries ) { my $no_results = 'No results for search %s'; $no_results = $swish->error_string . '
%s' if $swish->error; @@ -234,7 +236,11 @@ if ( my $search = param('search') ) { my $start = $pager->first; print qq|
    \n|; + my $limit = $pager->entries_on_this_page; + while ( my $result = $swish_results->next_result ) { + last if $limit-- == 0; + my $data = from_json $result->property('data'); dump_yaml( 'data', $data );