From: Dan Scott Date: Tue, 11 Nov 2014 16:53:24 +0000 (-0500) Subject: Treat a Polish l as an ASCII l in full-text search X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e505c1867be9e29404b7fb8aa43ef3e1b65ee5a7;p=contrib%2FConifer.git Treat a Polish l as an ASCII l in full-text search Is this code path even hit these days? Would have expected naco_normalize to be poking around here if that was the case... Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/fts.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/fts.pm index 429f9d7d65..504960bfa4 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/fts.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/fts.pm @@ -24,6 +24,9 @@ $term =~ s/(\pM+)//gos; $term =~ s/(\b\.\b)//gos; + $term =~ s/\x{142}/l/sgo; # Convert Polish l (lowercase) + $term =~ s/\x{141}/l/sgo; # Convert Polish l (uppercase) + # hack to normalize ratio-like strings while ($term =~ /\b\d{1}:[, ]?\d+(?:[ ,]\d+[^:])+/o) { $term = $` . join ('', split(/[, ]/, $&)) . $';