From d4f1cb11ef149b0dff77e1ba1584d50d29e2bf86 Mon Sep 17 00:00:00 2001 From: dbs Date: Tue, 28 Sep 2010 06:43:41 +0000 Subject: [PATCH] Make authority validation rules match authority ingest rules for better matches This resolves a problem in O:A:Storage:Publisher:authority:validate_tag() where the full NACO normalization rules that are applied to the subfields of the authority records when they are ingested into authority.full_rec are not similarly applied to the incoming subfields of the bib field that is being validated; only diacritic characters in the bib field subfields were being normalized. Now we apply naco_normalize() to the search terms so that they will match the ingested form of the authority record. Addresses https://bugs.launchpad.net/evergreen/+bug/649556 git-svn-id: svn://svn.open-ils.org/ILS/trunk@18076 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm index 3f5127c63c..62091ce7e0 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm @@ -33,11 +33,7 @@ sub validate_tag { for my $t ( @tags ) { for my $search ( @searches ) { my $sf = $$search{subfield}; - my $term = NFD(lc($$search{term})); - - $term =~ s/\pM+//sgo; - $term =~ s/\pC+//sgo; - $term =~ s/\W+$//o; + my $term = OpenILS::Application::Storage::FTS::naco_normalize($$search{term}, $sf); $tag = [$tag] if (!ref($tag)); -- 2.11.0