|
Lines 33-41
use JSON;
Link Here
|
| 33 |
|
33 |
|
| 34 |
use C4::Context; |
34 |
use C4::Context; |
| 35 |
use C4::Charset; |
35 |
use C4::Charset; |
| 36 |
use C4::AuthoritiesMarc; |
|
|
| 37 |
use C4::Auth qw/check_cookie_auth/; |
36 |
use C4::Auth qw/check_cookie_auth/; |
| 38 |
use C4::Output; |
37 |
use C4::Output; |
|
|
38 |
use Koha::SearchEngine::Search; |
| 39 |
use Koha::SearchEngine::QueryBuilder; |
| 39 |
|
40 |
|
| 40 |
my $query = new CGI; |
41 |
my $query = new CGI; |
| 41 |
|
42 |
|
|
Lines 60-66
if ( $auth_status ne "ok" ) {
Link Here
|
| 60 |
my $resultsperpage = 50; |
61 |
my $resultsperpage = 50; |
| 61 |
my $startfrom = 0; |
62 |
my $startfrom = 0; |
| 62 |
|
63 |
|
| 63 |
my ( $results, $total ) = SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, $startfrom * $resultsperpage, $resultsperpage, $authtypecode, $orderby ); |
64 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
|
|
65 |
{ index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
| 66 |
my $searcher = Koha::SearchEngine::Search->new( |
| 67 |
{ index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
| 68 |
my $search_query = $builder->build_authorities_query_compat( |
| 69 |
\@marclist, \@and_or, \@excluding, \@operator, |
| 70 |
\@value, $authtypecode, $orderby |
| 71 |
); |
| 72 |
my $offset = $startfrom * $resultsperpage; |
| 73 |
my ( $results, $total ) = |
| 74 |
$searcher->search_auth_compat( $search_query, $offset, |
| 75 |
$resultsperpage ); |
| 64 |
|
76 |
|
| 65 |
my %used_summaries; # hash to avoid duplicates |
77 |
my %used_summaries; # hash to avoid duplicates |
| 66 |
my @summaries; |
78 |
my @summaries; |