- my ( $results, $total ) = SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, $startfrom * $resultsperpage, $resultsperpage, $authtypecode, $orderby );
+ my $builder = Koha::SearchEngine::QueryBuilder->new(
+ { index => $Koha::SearchEngine::AUTHORITIES_INDEX } );
+ my $searcher = Koha::SearchEngine::Search->new(
+ { index => $Koha::SearchEngine::AUTHORITIES_INDEX } );
+ my $search_query = $builder->build_authorities_query_compat(
+ \@marclist, \@and_or, \@excluding, \@operator,
+ \@value, $authtypecode, $orderby
+ );
+ my $offset = $startfrom * $resultsperpage;
+ my ( $results, $total ) =
+ $searcher->search_auth_compat( $search_query, $offset,
+ $resultsperpage );