From: dbs Date: Tue, 15 Jun 2010 18:36:37 +0000 (+0000) Subject: Avoid spurious errors when searching more granular indexes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=78cc01f93b8938d2e7821a550cee8cbd3767c07a;p=evergreen%2Fbjwebb.git 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. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16720 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm index e06599c3c..0edce5fa4 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Authority.pm @@ -56,6 +56,9 @@ sub crossref_authority { 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);