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

(-)a/cataloguing/value_builder/unimarc_field_4XX.pl (-4 / +3 lines)
Lines 343-350 sub plugin { Link Here
343
        my $builder  = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
343
        my $builder  = Koha::SearchEngine::QueryBuilder->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
344
        my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
344
        my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BIBLIOS_INDEX});
345
345
346
        my ($builderror, $es_query)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']);
346
        my ($builderror, $search_query)= $builder->build_query_compat( undef, [$search], ['kw'], $limits, ['relevance']);
347
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($es_query, $startfrom * $resultsperpage, $resultsperpage );
347
        my ( $errors, $results, $total_hits ) = $searcher->simple_search_compat($search_query, $startfrom * $resultsperpage, $resultsperpage );
348
        if (defined $errors ) {
348
        if (defined $errors ) {
349
            $results = [];
349
            $results = [];
350
        }
350
        }
Lines 441-447 sub plugin { Link Here
441
        if ( $total_hits < $from + $resultsperpage ) {
441
        if ( $total_hits < $from + $resultsperpage ) {
442
            $to = $total_hits;
442
            $to = $total_hits;
443
        }else{
443
        }else{
444
            $to = $startfrom * $resultsperpage + $resultsperpage ;
444
            $to = $from * $resultsperpage ;
445
        }
445
        }
446
        my $defaultview =
446
        my $defaultview =
447
          'BiblioDefaultView' . C4::Context->preference('BiblioDefaultView');
447
          'BiblioDefaultView' . C4::Context->preference('BiblioDefaultView');
448
- 

Return to bug 26537