@@ -, +, @@ --- C4/Search.pm | 3 +++ acqui/neworderbiblio.pl | 5 ++++- cataloguing/addbooks.pl | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) --- a/C4/Search.pm +++ a/C4/Search.pm @@ -968,6 +968,9 @@ sub _build_stemmed_operand { require Lingua::Stem::Snowball ; my $stemmed_operand=q{}; + # Stemmer needs language + return $operand unless $lang; + # If operand contains a digit, it is almost certainly an identifier, and should # not be stemmed. This is particularly relevant for ISBNs and ISSNs, which # can contain the letter "X" - for example, _build_stemmend_operand would reduce --- a/acqui/neworderbiblio.pl +++ a/acqui/neworderbiblio.pl @@ -64,6 +64,7 @@ use C4::Auth; use C4::Output; use C4::Koha; use C4::Budgets qw/ GetBudgetHierarchy /; +use C4::Languages qw(getlanguage); use Koha::Acquisition::Booksellers; use Koha::SearchEngine; @@ -83,6 +84,7 @@ my $booksellerid = $params->{'booksellerid'}; my $basketno = $params->{'basketno'}; my $sub = $params->{'sub'}; my $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); +my $lang = C4::Languages::getlanguage($input); # getting the template my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -106,7 +108,8 @@ my $searcher = Koha::SearchEngine::Search->new({index => $Koha::SearchEngine::BI if ($QParser) { $builtquery = $query; } else { - ( undef,$builtquery,undef,undef,undef,undef,undef,undef,undef,undef) = $builder->build_query_compat(undef,\@operands); + ( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) = + $builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang ); } my ( $error, $marcresults, $total_hits ) = $searcher->simple_search_compat($builtquery, $results_per_page * ($page - 1), $results_per_page); --- a/cataloguing/addbooks.pl +++ a/cataloguing/addbooks.pl @@ -32,6 +32,7 @@ use C4::Biblio; use C4::Breeding; use C4::Output; use C4::Koha; +use C4::Languages qw(getlanguage); use C4::Search; use Koha::BiblioFrameworks; @@ -46,6 +47,7 @@ my $query = $input->param('q'); my @value = $input->multi_param('value'); my $page = $input->param('page') || 1; my $results_per_page = 20; +my $lang = C4::Languages::getlanguage($input); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -75,7 +77,8 @@ if ($query) { if ($QParser) { $builtquery = $query; } else { - ( undef,$builtquery,undef,undef,undef,undef,undef,undef,undef,undef) = $builder->build_query_compat(undef,\@operands); + ( undef, $builtquery, undef, undef, undef, undef, undef, undef, undef, undef ) = + $builder->build_query_compat( undef, \@operands, undef, undef, undef, 0, $lang ); } # find results my ( $error, $marcresults, $total_hits ) = $searcher->simple_search_compat($builtquery, $results_per_page * ($page - 1), $results_per_page); --