[open-ils-commits] r19177 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Search (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 13 22:00:52 EST 2011
Author: dbs
Date: 2011-01-13 22:00:51 -0500 (Thu, 13 Jan 2011)
New Revision: 19177
Modified:
branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
Log:
Enable truncation attribute in Z39.50 queries to be left out entirely
Per https://bugs.launchpad.net/evergreen/+bug/702695, some Z39.50
servers hate the truncation attribute (@attr 5=anything) and always
return 0 hits.
This gives you the ability to specify a negative value for the
truncation attribute and thereby prevent the truncation attribute
from being included in the Z39.50 query for a given server.
Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2011-01-14 02:57:46 UTC (rev 19176)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm 2011-01-14 03:00:51 UTC (rev 19177)
@@ -447,7 +447,8 @@
next unless ( exists $services{$service}->{attrs}->{$_} );
$str .= '@attr 1=' . $services{$service}->{attrs}->{$_}->{code} . # add the use attribute
' @attr 4=' . $services{$service}->{attrs}->{$_}->{format}; # add the structure attribute
- if (exists $services{$service}->{attrs}->{$_}->{truncation}){
+ if (exists $services{$service}->{attrs}->{$_}->{truncation}
+ && $services{$service}->{attrs}->{$_}->{truncation} >= 0) {
$str .= ' @attr 5=' . $services{$service}->{attrs}->{$_}->{truncation};
}
$str .= " \"" . $$hash{$_} . "\" "; # add the search term
More information about the open-ils-commits
mailing list