index=kw searches now search all indexes for nozebra
authorMason James <mason.james@liblime.com>
Tue, 18 Dec 2007 22:16:01 +0000 (16:16 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 18 Dec 2007 22:39:17 +0000 (16:39 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Search.pm

index 58c6b5e..b55c71d 100644 (file)
@@ -1351,7 +1351,7 @@ sub NZanalyse {
         $left='subject' if $left =~ '^su$';
         $left='koha-Auth-Number' if $left =~ '^an$';
         $left='keyword' if $left =~ '^kw$';
-        if ($operator) {
+        if ($operator && $left  ne 'keyword' ) {
             #do a specific search
             my $dbh = C4::Context->dbh;
             $operator='LIKE' if $operator eq '=' and $right=~ /%/;
@@ -1392,7 +1392,7 @@ sub NZanalyse {
                 }
             }
         } else {
-            #do a complete search (all indexes)
+            #do a complete search (all indexes), if index='kw' do complete search too.
             my $dbh = C4::Context->dbh;
             my $sth = $dbh->prepare("SELECT biblionumbers FROM nozebra WHERE server=? AND value LIKE ?");
             # split each word, query the DB and build the biblionumbers result