JBAS-1284 Strip apostrophes in search normalize
authorBill Erickson <berickxx@gmail.com>
Thu, 3 Mar 2016 23:04:18 +0000 (18:04 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Test case is title search for both forms:

ha-na'arah she-sihkah ba-esh
ha-Naʻarah she-śiḥḳah ba-esh

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/2.5-to-2.7-upgrade.sql

index 2bdd0e3..96c11be 100644 (file)
@@ -394,6 +394,9 @@ CREATE OR REPLACE FUNCTION public.search_normalize( TEXT, TEXT ) RETURNS TEXT AS
     # transformations based on Unicode category codes
     $str =~ s/[\p{Cc}\p{Cf}\p{Co}\p{Cs}\p{Lm}\p{Mc}\p{Me}\p{Mn}]//g;
 
+    # JBAS-1284 Strip apostrophes
+    $str =~ s/\'//g;
+
        if ($sf && $sf =~ /^a/o) {
                my $commapos = index($str, ',');
                if ($commapos > -1) {