X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/3215b5a9821d69a2216c2cdf2b64cd3eb27f7370..05124f9a86dadca50c693d57f8fc8398fb5d8be9:/IkiWiki/Plugin/search.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 3ac435197..8fc2f3724 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -108,8 +108,14 @@ sub index (@) { #{{{ if (! $stemmer) { my $langcode=$ENV{LANG} || "en"; $langcode=~s/_.*//; - eval { $stemmer=Search::Xapian::Stem->new($langcode) }; - if ($@) { + + # This whitelist is here to work around a xapian bug (#486138) + my @whitelist=qw{da de en es fi fr hu it no pt ru ro sv tr}; + + if (grep { $_ eq $langcode } @whitelist) { + $stemmer=Search::Xapian::Stem->new($langcode); + } + else { $stemmer=Search::Xapian::Stem->new("english"); } }