View | Details | Raw Unified | Return to bug 26537
Collapse All | Expand All

(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-4 / +3 lines)
Lines 347-354 sub plugin { Link Here
347
        my $builder  = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
347
        my $builder  = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
348
        my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
348
        my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
349
349
350
        my ($builderror, $es_query)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']);
350
        my ($builderror, $search_query)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']);
351
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($es_query, $startfrom * $resultsperpage, $resultsperpage );
351
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($search_query, $startfrom * $resultsperpage, $resultsperpage );
352
        if (defined $errors ) {
352
        if (defined $errors ) {
353
            $results = [];
353
            $results = [];
354
        }
354
        }
Lines 445-451 sub plugin { Link Here
445
        if ( $total_hits < $from + $resultsperpage ) {
445
        if ( $total_hits < $from + $resultsperpage ) {
446
            $to = $total_hits;
446
            $to = $total_hits;
447
        }else{
447
        }else{
448
            $to = $startfrom * $resultsperpage + $resultsperpage ;
448
            $to = $from * $resultsperpage ;
449
        }
449
        }
450
#         my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search";
450
#         my $link="/cgi-bin/koha/cataloguing/value_builder/unimarc4XX.pl?op=do_search&q=$search_desc&resultsperpage=$resultsperpage&startfrom=$startfrom&search=$search";
451
#           foreach my $sort (@sort_by){
451
#           foreach my $sort (@sort_by){
452
- 

Return to bug 26537