|
Lines 43-49
my $query = $input->param('q');
Link Here
|
| 43 |
my @value = $input->multi_param('value'); |
43 |
my @value = $input->multi_param('value'); |
| 44 |
my $page = $input->param('page') || 1; |
44 |
my $page = $input->param('page') || 1; |
| 45 |
my $results_per_page = 20; |
45 |
my $results_per_page = 20; |
| 46 |
my $lang = C4::Languages::getlanguage($input); |
|
|
| 47 |
|
46 |
|
| 48 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
47 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 49 |
{ |
48 |
{ |
|
Lines 60-71
if ($query) {
Link Here
|
| 60 |
# build query |
59 |
# build query |
| 61 |
my @operands = $query; |
60 |
my @operands = $query; |
| 62 |
|
61 |
|
|
|
62 |
my $current_lang = C4::Languages::getlanguage($input); |
| 63 |
my $builtquery; |
63 |
my $builtquery; |
| 64 |
my $query_cgi; |
64 |
my $query_cgi; |
| 65 |
my $builder = Koha::SearchEngine::QueryBuilder->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
65 |
my $builder = Koha::SearchEngine::QueryBuilder->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
| 66 |
my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
66 |
my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
| 67 |
( undef, $builtquery, undef, $query_cgi, undef, undef, undef, undef, undef, undef ) = |
67 |
( undef, $builtquery, undef, $query_cgi, undef, undef, undef, undef, undef, undef ) = $builder->build_query_compat( |
| 68 |
$builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang, { weighted_fields => 1 } ); |
68 |
undef, \@operands, undef, undef, undef, 0, $current_lang, |
|
|
69 |
{ weighted_fields => 1 } |
| 70 |
); |
| 69 |
|
71 |
|
| 70 |
$template->param( search_query => $builtquery ) if C4::Context->preference('DumpSearchQueryTemplate'); |
72 |
$template->param( search_query => $builtquery ) if C4::Context->preference('DumpSearchQueryTemplate'); |
| 71 |
|
73 |
|
| 72 |
- |
|
|