[Koha-patches] [PATCH] Bug 3154 Limit facets computing on first 50 biblios
Frédéric Demians
f.demians at tamil.fr
Mon Feb 21 19:13:11 CET 2011
With this limitation to 50, we are sure that Fridolyn patch doesn't impact
search performance.
Branch: new/bug_3154
Now someone must add:
- The ability to increase this number via a syspref, for example
FacetFirstBiblios
- The ability to hide facet count by syspref, for ex. FacetHideCount
---
C4/Search.pm | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/C4/Search.pm b/C4/Search.pm
index ea76acd..371638d 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -457,12 +457,9 @@ sub getRecords {
# Fill the facets while we're looping, but only for the biblioserver and not for a scan
if ( !$scan && $servers[ $i - 1 ] =~ /biblioserver/ ) {
-
+ my $facet_first_biblios = 50; #FIXME Should be a syspref
my $jmax = $size;
- if ( $jmax > 500 ) {
- $jmax = 500; # limit to 500 first records
- }
-
+ $jmax = $facet_first_biblios if $jmax > $facet_first_biblios;
for ( my $k = 0 ; $k <= @$facets ; $k++ ) {
($facets->[$k]) or next;
my @fcodes = @{$facets->[$k]->{'tags'}};
--
1.7.4
More information about the Koha-patches
mailing list