LP#1290496: The quest for knowledge is over
authorDan Wells <dbw2@calvin.edu>
Sat, 22 Mar 2014 02:44:42 +0000 (22:44 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Tue, 25 Mar 2014 19:33:43 +0000 (15:33 -0400)
An apparently bad query plan causes Z39.50 searches of local
catalog to take an extremely long time to complete.  One theory
is that metabib.rec_descriptor is the culprit, but that has not
been verified.

This commit works around the immediate problem, but will need to
be revisited.  Some questions include:

1) Should we rewrite parts of open-ils.search.biblio.multiclass
(and the underlying storage methods) to use the new attr structures
more directly, rather than through a view of a view?

2) Alternately, should we rip it out?  If so, we will need to also
remove/nullify the "use_staged_search" option, since there will be
no functional non-staged offering.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>

Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm

index 25cf4e5..0009024 100644 (file)
@@ -1008,7 +1008,7 @@ sub cat_search_z_style_wrapper {
     $$searchhash{searches}{keyword}{term} .= join ' ', $$searchhash{searches}{keyword}{term}, $$args{search}{pubdate}   if $$args{search}{pubdate};
     $$searchhash{searches}{keyword}{term} .= join ' ', $$searchhash{searches}{keyword}{term}, $$args{search}{item_type} if $$args{search}{item_type};
 
-    my $list = the_quest_for_knowledge( $self, $client, $searchhash );
+    my ($list) = $self->method_lookup('open-ils.search.biblio.multiclass.staged')->run( $searchhash );
 
     if ($list->{count} > 0 and @{$list->{ids}}) {
         $result->{count} = $list->{count};