Lines 329-335
sub plugin {
Link Here
|
329 |
my $limits = $itype ? ["mc-itype,phr:$itype"] : []; |
329 |
my $limits = $itype ? ["mc-itype,phr:$itype"] : []; |
330 |
my $builder = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); |
330 |
my $builder = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX}); |
331 |
my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
331 |
my $searcher = Koha::SearchEngine::Search->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); |
332 |
my ($builderror, $es_query)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']); |
332 |
my ($builderror, $search)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']); |
333 |
my ( $errors, $results, $total_hits ) = |
333 |
my ( $errors, $results, $total_hits ) = |
334 |
$searcher->simple_search_compat( $search, $startfrom * $resultsperpage, $resultsperpage ); |
334 |
$searcher->simple_search_compat( $search, $startfrom * $resultsperpage, $resultsperpage ); |
335 |
|
335 |
|
Lines 421-427
sub plugin {
Link Here
|
421 |
if ( $total_hits < $from + $resultsperpage ) { |
421 |
if ( $total_hits < $from + $resultsperpage ) { |
422 |
$to = $total_hits; |
422 |
$to = $total_hits; |
423 |
} else { |
423 |
} else { |
424 |
$to = $startfrom * $resultsperpage + $resultsperpage ; |
424 |
$to = $from * $resultsperpage ; |
425 |
} |
425 |
} |
426 |
|
426 |
|
427 |
# my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search"; |
427 |
# my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search"; |
428 |
- |
|
|