[Koha-patches] [PATCH] [SIGNED-OFF] Bug5555 Corrected search for ISBN / ISSN

Stéphane Delaune stephane.delaune at biblibre.com
Wed Apr 6 09:36:22 CEST 2011


From: Janusz Kaczmarek <januszop at gmail.com>


Signed-off-by: Stéphane Delaune <stephane.delaune at biblibre.com>
---
 C4/Search.pm |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index c69e787..9cf9a25 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1146,7 +1146,6 @@ sub buildQuery {
                 }
                 # ISBN,ISSN,Standard Number, don't need special treatment
                 elsif ( $index eq 'nb' || $index eq 'ns' ) {
-                    $indexes_set++;
                     (
                         $stemming,      $auto_truncation,
                         $weight_fields, $fuzzy_enabled,
@@ -1161,7 +1160,7 @@ sub buildQuery {
 
                 # Set default structure attribute (word list)
                 my $struct_attr = q{};
-                unless ( $indexes_set || !$index || $index =~ /(st-|phr|ext|wrdl)/ ) {
+                unless ( $indexes_set || !$index || $index =~ /(st-|phr|ext|wrdl|nb|ns)/ ) {
                     $struct_attr = ",wrdl";
                 }
 
@@ -1353,7 +1352,7 @@ sub buildQuery {
     # This is flawed , means we can't search anything with : in it
     # if user wants to do ccl or cql, start the query with that
 #    $query =~ s/:/=/g;
-    $query =~ s/(?<=(ti|au|pb|su|an|kw|mc)):/=/g;
+    $query =~ s/(?<=(ti|au|pb|su|an|kw|mc|nb|ns)):/=/g;
     $query =~ s/(?<=(wrdl)):/=/g;
     $query =~ s/(?<=(trn|phr)):/=/g;
     $limit =~ s/:/=/g;
-- 
1.7.0.4



More information about the Koha-patches mailing list