From 60a68229ad876590d0fcee88a89dbdfabf58c1ff Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 5 Jun 2019 20:22:32 +0000 Subject: [PATCH] Bug 22924: [alternate] Make elasticsearch honour FacetMaxCount system preference We have a line in QueryBuilder to respect the preference if a facet is expanded, it seems we forgot to pass the option to the querybuilder however To test: 1 - Enable Elasticsearch 2 - Set FacetMaxCount to 20 3 - Search in ES for '*' or something with a lot of results 4 - Expand some facets, note you get no more than 10 for any facet 5 - Apply patch 6 - Search again 7 - Expand facets, note they now go up to 20 8 - Try with various values of FacetMaxCount --- catalogue/search.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/catalogue/search.pl b/catalogue/search.pl index 514c4a9b2c..bc361333b8 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -465,6 +465,7 @@ my $expanded_facet = $params->{'expand'}; my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type); my $build_params; +$build_params->{expanded_facet} = $expanded_facet; unless ( $cgi->param('advsearch') ) { $build_params->{weighted_fields} = 1; } -- 2.11.0