Lines 97-121
if ( $op eq "do_search" ) {
Link Here
|
97 |
} |
97 |
} |
98 |
); |
98 |
); |
99 |
|
99 |
|
100 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
100 |
my $builder = Koha::SearchEngine::QueryBuilder->new( { index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
101 |
{ index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
101 |
my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
102 |
my $searcher = Koha::SearchEngine::Search->new( |
|
|
103 |
{ index => $Koha::SearchEngine::AUTHORITIES_INDEX } ); |
104 |
|
102 |
|
105 |
my $search_query = $builder->build_authorities_query_compat( |
103 |
my $search_query = $builder->build_authorities_query_compat( |
106 |
[$marclist], [$and_or], [$excluding], [$operator], |
104 |
[$marclist], [$and_or], [$excluding], [$operator], |
107 |
[$value], $authtypecode, $orderby |
105 |
[$value], $authtypecode, $orderby |
108 |
); |
106 |
); |
109 |
my ( $results, $total ); |
107 |
my ( $results, $total ); |
110 |
eval { |
108 |
eval { ( $results, $total ) = $searcher->search_auth_compat( $search_query, $offset, $resultsperpage ); }; |
111 |
( $results, $total ) = $searcher->search_auth_compat( |
|
|
112 |
$search_query, $offset, $resultsperpage |
113 |
); |
114 |
}; |
115 |
if ($@) { |
109 |
if ($@) { |
116 |
my $query_error = q{}; |
110 |
my $query_error = q{}; |
117 |
$query_error .= $@ if $@; |
111 |
$query_error .= $@ if $@; |
118 |
$template->param(query_error => $query_error); |
112 |
$template->param( query_error => $query_error ); |
119 |
} |
113 |
} |
120 |
|
114 |
|
121 |
$template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate'); |
115 |
$template->param( search_query => $search_query ) if C4::Context->preference('DumpSearchQueryTemplate'); |