Lines 155-160
use Koha::Patrons;
Link Here
|
155 |
use Koha::SearchEngine::Search; |
155 |
use Koha::SearchEngine::Search; |
156 |
use Koha::SearchEngine::QueryBuilder; |
156 |
use Koha::SearchEngine::QueryBuilder; |
157 |
use Koha::Virtualshelves; |
157 |
use Koha::Virtualshelves; |
|
|
158 |
use Koha::SearchFields; |
158 |
|
159 |
|
159 |
use URI::Escape; |
160 |
use URI::Escape; |
160 |
|
161 |
|
Lines 455-460
my $expanded_facet = $params->{'expand'};
Link Here
|
455 |
# Define some global variables |
456 |
# Define some global variables |
456 |
my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type); |
457 |
my ( $error,$query,$simple_query,$query_cgi,$query_desc,$limit,$limit_cgi,$limit_desc,$query_type); |
457 |
|
458 |
|
|
|
459 |
my ($w_fields, $weight); |
460 |
unless ( $cgi->param('advsearch') ) { |
461 |
($w_fields, $weight) = Koha::SearchFields->weighted_fields(); |
462 |
} |
463 |
|
458 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
464 |
my $builder = Koha::SearchEngine::QueryBuilder->new( |
459 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
465 |
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
460 |
my $searcher = Koha::SearchEngine::Search->new( |
466 |
my $searcher = Koha::SearchEngine::Search->new( |
Lines 467-473
my $searcher = Koha::SearchEngine::Search->new(
Link Here
|
467 |
$query_type |
473 |
$query_type |
468 |
) |
474 |
) |
469 |
= $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits, |
475 |
= $builder->build_query_compat( \@operators, \@operands, \@indexes, \@limits, |
470 |
\@sort_by, $scan, $lang ); |
476 |
\@sort_by, $scan, $lang, { w_fields => @$w_fields, weight => @$weight } ); |
471 |
|
477 |
|
472 |
## parse the query_cgi string and put it into a form suitable for <input>s |
478 |
## parse the query_cgi string and put it into a form suitable for <input>s |
473 |
my @query_inputs; |
479 |
my @query_inputs; |