[open-ils-commits] r16720 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jun 15 14:36:42 EDT 2010


Author: dbs
Date: 2010-06-15 14:36:37 -0400 (Tue, 15 Jun 2010)
New Revision: 16720

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm
Log:
Avoid spurious errors when searching more granular indexes

The storage service automatically generates methods for each top-level search
class, like open-ils.storage.authority.keyword.see_from.controlled.atomic, but
here we were trying to access more granular methods (which storage does not
know about) when a granular index was used. This generated an ugly error in
the logs. 

To avoid these errors, we'll only look for cross references from the broad
index class to which the granular index belonds.


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm	2010-06-15 04:01:23 UTC (rev 16719)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm	2010-06-15 18:36:37 UTC (rev 16720)
@@ -56,6 +56,9 @@
 
 	my $session = OpenSRF::AppSession->create("open-ils.storage");
 
+	# Avoid generating spurious errors for more granular indexes, like author|personal
+	$class =~ s/^(.*?)\|.*?$/$1/;
+
 	$logger->info("authority xref search for $class=$term, limit=$limit");
 	my $fr = $session->request(
 		"open-ils.storage.authority.$class.see_from.controlled.atomic",$term, $limit)->gather(1);



More information about the open-ils-commits mailing list