From ef8f3de8a0b97ebf4f9fa36436e26e4a49ab468b Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 17 Oct 2008 15:16:01 +0000 Subject: [PATCH] after all search results scanned, we know the exact hit count, so use that instead of the estimated count git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@10859 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index d60b64dc3c..54209d99b0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -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)]; -- 2.11.0