From: erickson Date: Thu, 1 Feb 2007 16:35:22 +0000 (+0000) Subject: fixed error in Z query builder, now separating out the "use" and "structure" attributes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=673ff542fa61ddca34a140b0aa931a3bec891490;p=Evergreen.git fixed error in Z query builder, now separating out the "use" and "structure" attributes git-svn-id: svn://svn.open-ils.org/ILS/trunk@6846 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index 7a90289f86..06c99525e4 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -191,7 +191,7 @@ sub do_search { 'Z3950_BAD_QUERY', payload => $query, debug => "$err") if $err; return OpenILS::Event->new('Z3950_SEARCH_FAILED', - debug => $connection->errcode.":".$connection->errmsg) unless $results; + debug => $connection->errcode." => ".$connection->errmsg." : query = $query") unless $results; $logger->info("z3950: search [$query] took ".(time - $start)." seconds"); @@ -277,10 +277,18 @@ sub compile_query { my $str = ""; $str .= "\@$seperator " for (1..$count-1); + # ------------------------------------------------------------------- + # "code" is the bib-1 "use attribute", "format" is the bib-1 + # "structure attribute" + # ------------------------------------------------------------------- for( keys %$hash ) { - $str .= '@attr ' . - $services{$service}->{attrs}->{$_}->{format} . '=' . - $services{$service}->{attrs}->{$_}->{code} . " \"" . $$hash{$_} . "\" "; +# $str .= '@attr ' . +# $services{$service}->{attrs}->{$_}->{format} . '=' . +# $services{$service}->{attrs}->{$_}->{code} . " \"" . $$hash{$_} . "\" "; + $str .= + '@attr 1=' . $services{$service}->{attrs}->{$_}->{code} . # add the use attribute + ' @attr 4=' . $services{$service}->{attrs}->{$_}->{format} . # add teh structure attribute + " \"" . $$hash{$_} . "\" "; # add the search term } return $str; }