[open-ils-commits] r10858 - branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Oct 17 11:15:19 EDT 2008


Author: erickson
Date: 2008-10-17 11:15:17 -0400 (Fri, 17 Oct 2008)
New Revision: 10858

Modified:
   branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
after all search results scanned, we know the exact hit count, so use that instead of the estimated count

Modified: branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-10-17 01:33:49 UTC (rev 10857)
+++ branches/rel_1_2_3/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-10-17 15:15:17 UTC (rev 10858)
@@ -799,7 +799,10 @@
         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)];



More information about the open-ils-commits mailing list