Lines 357-367
sub plugin {
Link Here
|
357 |
my $itype = $query->param('itype'); |
357 |
my $itype = $query->param('itype'); |
358 |
my $startfrom = $query->param('startfrom'); |
358 |
my $startfrom = $query->param('startfrom'); |
359 |
my $resultsperpage = $query->param('resultsperpage') || 20; |
359 |
my $resultsperpage = $query->param('resultsperpage') || 20; |
|
|
360 |
my $searchquery = ''; |
360 |
my $orderby; |
361 |
my $orderby; |
361 |
my $op = 'and'; |
362 |
$searchquery .= 'kw:'.$search if $search; |
362 |
$search = 'kw:'.$search." $op mc-itemtype:".$itype if $itype; |
363 |
$searchquery .= ' AND ' if $search && $itype; |
|
|
364 |
$searchquery .= 'mc-itemtype:'.$itype if $itype; |
363 |
my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); |
365 |
my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); |
364 |
my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($search, $startfrom * $resultsperpage, $resultsperpage ); |
366 |
my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($searchquery, $startfrom * $resultsperpage, $resultsperpage ); |
365 |
if (defined $errors ) { |
367 |
if (defined $errors ) { |
366 |
$results = []; |
368 |
$results = []; |
367 |
} |
369 |
} |
368 |
- |
|
|