Bug5555 Corrected search for ISBN / ISSN
authorJanusz Kaczmarek <januszop@gmail.com>
Wed, 6 Apr 2011 07:36:22 +0000 (09:36 +0200)
committerChris Nighswonger <chris.nighswonger@gmail.com>
Mon, 11 Apr 2011 19:51:00 +0000 (15:51 -0400)
Signed-off-by: Stéphane Delaune <stephane.delaune@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit ab7435f964336a18f760b9dd91d4b4506528a051)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
C4/Search.pm

index 56dddb0..1f55fde 100644 (file)
@@ -1119,7 +1119,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,
@@ -1134,7 +1133,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";
                 }
 
@@ -1326,7 +1325,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;