From ab54b5458d9cfe2db7b5290a301513355c3fdd3b Mon Sep 17 00:00:00 2001 From: Nick Date: Tue, 1 Oct 2019 09:02:20 +0000 Subject: [PATCH] Bug 20589: Remove expanded_facet variable and fix tests Thi is a rebase from 14419 to remove an unused variable Also update tests to expect the new expected result Signed-off-by: Nick Clemens Signed-off-by: Alex Arnaud Signed-off-by: Martin Renvoize --- opac/opac-search.pl | 1 - t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 582ce565b5..ea78ca0b23 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -565,7 +565,6 @@ if (C4::Context->preference('OpacSuppression')) { 0, $lang, { - expanded_facet => $expanded_facet, suppress => $suppress, is_opac => 1, weighted_fields => !$cgi->param('advsearch') diff --git a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t index 488e4ac80c..5e695a0738 100644 --- a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t +++ b/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t @@ -178,7 +178,7 @@ subtest 'build_authorities_query_compat() tests' => sub { $query = $qb->build_authorities_query_compat( [ 'mainentry' ], undef, undef, ['contains'], [$search_term], 'AUTH_TYPE', 'asc' ); is_deeply( $query->{query}->{bool}->{filter}, - { term => { 'authtype' => 'auth_type' } }, + { term => { 'authtype.raw' => 'AUTH_TYPE' } }, "authorities type code is used as filter" ); -- 2.39.5