summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7691c27)
fix seeking in search results and returning only single page
git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1170
07558da8-63fa-0310-ba24-
9fe276d99e06
$pager->total_entries( $swish_results->hits );
$pager->total_entries( $swish_results->hits );
+ $swish_results->seek_result( $pager->first );
+
if ( ! $pager->total_entries ) {
my $no_results = 'No results for search <b>%s</b>';
$no_results = $swish->error_string . '<br><b>%s</b>' if $swish->error;
if ( ! $pager->total_entries ) {
my $no_results = 'No results for search <b>%s</b>';
$no_results = $swish->error_string . '<br><b>%s</b>' if $swish->error;
my $start = $pager->first;
print qq|<ol start=$start>\n|;
my $start = $pager->first;
print qq|<ol start=$start>\n|;
+ my $limit = $pager->entries_on_this_page;
+
while ( my $result = $swish_results->next_result ) {
while ( my $result = $swish_results->next_result ) {
+ last if $limit-- == 0;
+
my $data = from_json $result->property('data');
dump_yaml( 'data', $data );
my $data = from_json $result->property('data');
dump_yaml( 'data', $data );