]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/SearchView.pm
searchview: increase limit for displaying search results
[public-inbox.git] / lib / PublicInbox / SearchView.pm
index ccc53abf23e4f5a0a24d4d07b56fc648b857932a..f1c4b6a052181e28c28127403a07d3732972151b 100644 (file)
@@ -13,7 +13,7 @@ use PublicInbox::MID qw(mid2path mid_mime mid_clean mid_escape);
 use PublicInbox::MIME;
 require PublicInbox::Git;
 require PublicInbox::SearchThread;
-our $LIM = 50;
+our $LIM = 200;
 
 sub noop {}
 
@@ -145,15 +145,21 @@ sub search_nav_bot {
        my $o = $q->{o};
        my $end = $o + $nr;
        my $beg = $o + 1;
-       my $rv = "</pre><hr><pre>Results $beg-$end of $total";
+       my $rv = '</pre><hr><pre>';
+       if ($beg <= $end) {
+               $rv .= "Results $beg-$end of $total";
+               $rv .= ' (estimated)' if $end != $total;
+       } else {
+               $rv .= "No more results, only $total";
+       }
        my $n = $o + $LIM;
 
        if ($n < $total) {
                my $qs = $q->qs_html(o => $n);
-               $rv .= qq{, <a\nhref="?$qs"\nrel=next>next</a>}
+               $rv .= qq{  <a\nhref="?$qs"\nrel=next>next</a>}
        }
        if ($o > 0) {
-               $rv .= $n < $total ? '/' : ',      ';
+               $rv .= $n < $total ? '/' : '       ';
                my $p = $o - $LIM;
                my $qs = $q->qs_html(o => ($p > 0 ? $p : 0));
                $rv .= qq{<a\nhref="?$qs"\nrel=prev>prev</a>};