after all search results scanned, we know the exact hit count, so use that instead...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 17 Oct 2008 15:15:17 +0000 (15:15 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 17 Oct 2008 15:15:17 +0000 (15:15 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2_3@10858 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm

index d9cb12d..f17de94 100644 (file)
@@ -799,7 +799,10 @@ sub staged_search {
         last if $current_count >= ($user_limit + $user_offset);
 
         # we've scanned all possible hits
-        last if $summary->{checked} < $superpage_size;
+        if($summary->{checked} < $superpage_size) {
+            $est_hit_count = scalar(@$all_results);
+            last;
+        }
     }
 
     my @results = grep {defined $_} @$all_results[$user_offset..($user_offset + $user_limit - 1)];