<<

NAME

Koha::SearchEngine::Search - instantiate the search object that corresponds to the SearchEngine system preference.

DESCRIPTION

This allows you to be agnostic about what the search engine configuration is and just get whatever search object you need.

SYNOPSIS

    use Koha::SearchEngine::Search;
    my $searcher = Koha::SearchEngine::Search->new();

METHODS

new

Creates a new Search of whatever the relevant type is.

extract_biblionumber

    my $biblionumber = $searcher->extract_biblionumber( $marc );

Returns the biblionumber from $marc. The routine is called from the extract_biblionumber method of the specific search engine.

pagination_bar

my ( $PAGE_NUMBERS, $hits_to_paginate, $pages, $current_page_number, $previous_page_offset, $next_page_offset, $last_page_offset ) = Koha::SearchEngine::Search->pagination_bar( { hits => $hits, max_result_window => $max_result_window, results_per_page => $results_per_page, offset => $offset, sort_by => \@sort_by } );

Returns the variables needed for the page-nubers.inc to build search results

post_filter_opac_facets

    if ( C4::Context->interface eq 'opac' ) {
        my $rules = C4::Context->yaml_preference('OpacHiddenItems');
        $facets = Koha::SearchEngine::Search->post_filter_facets({ facets => $facets, rules => $rules });
    }

<<