Stemming can output empty strings, e.g. for numbers.
Ignore these.
Reported by Cyril Jaquier <cyril jaquier -at- jaqpot net>
push @tmp, $keyword;
}
my $stemmer = Lingua::Stem->new();
- my $stemmed_keywords = $stemmer->stem( @tmp );
+ my @stemmed_keywords = grep { length($_) } @{$stemmer->stem( @tmp )};
my $db = Search::Xapian::Database->new( $dbpath );
- my $enq = $db->enquire( OP_OR, @$keywords, @$stemmed_keywords );
+ my $enq = $db->enquire( OP_OR, @$keywords, @stemmed_keywords );
debug( "Xapian Query was: ".$enq->get_query()->get_description(), 1) if DEBUG;
my @matches = $enq->matches(0, 999);