Lines 28-33
use C4::Context;
Link Here
|
28 |
use C4::AuthoritiesMarc; |
28 |
use C4::AuthoritiesMarc; |
29 |
use C4::Acquisition; |
29 |
use C4::Acquisition; |
30 |
use C4::Koha; |
30 |
use C4::Koha; |
|
|
31 |
use Koha::SearchEngine::Search; |
32 |
use Koha::SearchEngine::QueryBuilder; |
31 |
|
33 |
|
32 |
use Koha::Authority::Types; |
34 |
use Koha::Authority::Types; |
33 |
|
35 |
|
Lines 69-78
if ( $op eq "do_search" ) {
Link Here
|
69 |
my $startfrom = $query->param('startfrom') || 0; |
71 |
my $startfrom = $query->param('startfrom') || 0; |
70 |
my $resultsperpage = $query->param('resultsperpage') || 20; |
72 |
my $resultsperpage = $query->param('resultsperpage') || 20; |
71 |
|
73 |
|
|
|
74 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
75 |
{ index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
76 |
my $searcher = Koha::SearchEngine::Search->new( |
77 |
{ index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
78 |
my $search_query = $builder->build_authorities_query_compat( |
79 |
\@marclist, \@and_or, \@excluding, \@operator, |
80 |
\@value, $authtypecode, $orderby |
81 |
); |
82 |
my $offset = $startfrom * $resultsperpage; |
72 |
my ( $results, $total ) = |
83 |
my ( $results, $total ) = |
73 |
SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator, \@value, |
84 |
$searcher->search_auth_compat( $search_query, $offset, |
74 |
$startfrom * $resultsperpage, |
85 |
$resultsperpage ); |
75 |
$resultsperpage, $authtypecode, $orderby ); |
|
|
76 |
|
86 |
|
77 |
# multi page display gestion |
87 |
# multi page display gestion |
78 |
my $displaynext = 0; |
88 |
my $displaynext = 0; |