Bug 8550: Z39.50 searches for ISBN/ISSN problematic

Rather than treating ISBN and ISSN as the same, this patch breaks
them out into separate parts of the query, as well as changing
the truncation attribute to enable right truncation (the correct
behavior for the ISBN field in MARC21, and valid behavior in
UNIMARC).

Signed-off-by: Joseph Alway <jbalway@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Jared Camins-Esakov 2012-08-01 13:34:33 -04:00 committed by Paul Poulain
parent 787aa9819c
commit 59cf30c9f3

View file

@ -117,10 +117,14 @@ else {
my $s = 0;
my $query = '';
my $nterms;
if ($isbn || $issn) {
$term=$isbn if ($isbn);
$term=$issn if ($issn);
$query .= " \@or \@attr 1=8 \"$term\" \@attr 1=7 \"$term\" ";
if ($isbn) {
$term=$isbn;
$query .= " \@attr 1=7 \@attr 5=1 \"$term\" ";
$nterms++;
}
if ($issn) {
$term=$issn;
$query .= " \@attr 1=8 \@attr 5=1 \"$term\" ";
$nterms++;
}
if ($title) {