[open-ils-commits] r18076 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Sep 28 02:43:46 EDT 2010


Author: dbs
Date: 2010-09-28 02:43:41 -0400 (Tue, 28 Sep 2010)
New Revision: 18076

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm
Log:
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


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm	2010-09-28 06:18:07 UTC (rev 18075)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/authority.pm	2010-09-28 06:43:41 UTC (rev 18076)
@@ -33,12 +33,8 @@
 	for my $t ( @tags ) {
 		for my $search ( @searches ) {
 			my $sf = $$search{subfield};
-			my $term = NFD(lc($$search{term}));
+			my $term = OpenILS::Application::Storage::FTS::naco_normalize($$search{term}, $sf);
 
-			$term =~ s/\pM+//sgo;
-			$term =~ s/\pC+//sgo;
-			$term =~ s/\W+$//o;
-
 			$tag = [$tag] if (!ref($tag));
 
 			push @values, $t, $sf, $term;



More information about the open-ils-commits mailing list