Bug 8653 remove erroneous whitespace blocking indexing
[koha.git] / cataloguing / z3950_search.pl
index 6e6b417..5e22636 100755 (executable)
@@ -115,12 +115,16 @@ else {
     my @oResult;
     my @errconn;
     my $s = 0;
-    my $query;
+    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) {