NoZera don't handle fuzzy/stemming/weight
authorPaul POULAIN <paul@koha-fr.org>
Tue, 11 Dec 2007 17:33:32 +0000 (18:33 +0100)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 13 Dec 2007 23:57:03 +0000 (17:57 -0600)
so ignoring those sysprefs

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Search.pm

index 371d1aa..125c7a4 100644 (file)
@@ -698,6 +698,12 @@ sub buildQuery {
        my $auto_truncation = C4::Context->preference("QueryAutoTruncate")              || 0;
     my $weight_fields = C4::Context->preference("QueryWeightFields")           || 0;
     my $fuzzy_enabled = C4::Context->preference("QueryFuzzy")                          || 0;
+    # no stemming/weight/fuzzy in NoZebra
+    if (C4::Context->preference("NoZebra")) {
+        $stemming =0;
+        $weight_fields=0;
+        $fuzzy_enabled=0;
+    }
        my $remove_stopwords = C4::Context->preference("QueryRemoveStopwords")  || 0;
 
     my $query = $operands[0];