From cd9946f0d4cc76df12883c4a0fec9f4e38fa623c Mon Sep 17 00:00:00 2001 From: Robin Sheat Date: Mon, 15 Jun 2015 17:35:41 +1200 Subject: [PATCH] Bug 12478: auth search works in the staff client Some issues with sort order though. Signed-off-by: Nick Clemens Signed-off-by: Jesse Weaver Signed-off-by: Tomas Cohen Arazi Signed-off-by: Kyle M Hall Signed-off-by: Brendan Gallagher --- Koha/SearchEngine/Elasticsearch/Search.pm | 2 +- authorities/authorities-home.pl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/Search.pm b/Koha/SearchEngine/Elasticsearch/Search.pm index 26f0dff46d..e76ab3ea0d 100644 --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ b/Koha/SearchEngine/Elasticsearch/Search.pm @@ -186,7 +186,7 @@ sub search_auth_compat { # rather than hard-coded conversions. # Our results often come through as nested arrays, to fix this # requires changes in catmandu. - my $authid = $record->{ 'Local-Number' }[0][0]; + my $authid = $record->{ 'local-number' }[0][0]; $result{authid} = $authid; # TODO put all this info into the record at index time so we diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index 53e1fa492f..4fdd4289da 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -34,6 +34,8 @@ use C4::Biblio; use C4::Search::History; use Koha::Authority::Types; +use Koha::SearchEngine::Search; +use Koha::SearchEngine::QueryBuilder; my $query = new CGI; my $dbh = C4::Context->dbh; @@ -85,9 +87,8 @@ if ( $op eq "do_search" ) { ); $startfrom = $startfrom // 0; my ( $results, $total ) = - $searcher->search_auth_compat( $search_query, $startfrom + 1, + $searcher->search_auth_compat( $search_query, $startfrom, $resultsperpage ); - #my ( $results, $total ) = SearchAuthorities( # [$marclist], [$and_or], # [$excluding], [$operator], -- 2.39.5