Bug Fixing : Search Broken with stemming
Stemming can't use exceptions Removing exceptions management
This commit is contained in:
parent
9a43a47755
commit
2d4432569e
1 changed files with 8 additions and 7 deletions
15
C4/Search.pm
15
C4/Search.pm
|
@ -710,13 +710,14 @@ sub _build_stemmed_operand {
|
|||
encoding => "UTF-8" );
|
||||
|
||||
# FIXME: these should be stored in the db so the librarian can modify the behavior
|
||||
$stemmer->add_exceptions(
|
||||
{
|
||||
'and' => 'and',
|
||||
'or' => 'or',
|
||||
'not' => 'not',
|
||||
}
|
||||
);
|
||||
# Lingua::Stem can't add exceptions
|
||||
# $stemmer->add_exceptions(
|
||||
# {
|
||||
# 'and' => 'and',
|
||||
# 'or' => 'or',
|
||||
# 'not' => 'not',
|
||||
# }
|
||||
# );
|
||||
my @words = split( / /, $operand );
|
||||
my @stems = $stemmer->stem(\@words);
|
||||
for my $stem (@stems) {
|
||||
|
|
Loading…
Reference in a new issue