Bug 12478: auth search works in the staff client
authorRobin Sheat <robin@catalyst.net.nz>
Mon, 15 Jun 2015 05:35:41 +0000 (17:35 +1200)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 26 Apr 2016 20:20:06 +0000 (20:20 +0000)
Some issues with sort order though.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Koha/SearchEngine/Elasticsearch/Search.pm
authorities/authorities-home.pl

index 26f0dff..e76ab3e 100644 (file)
@@ -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
index 53e1fa4..4fdd428 100755 (executable)
@@ -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],