don't add wildcards only to full words and, or, not (part of swish-e quiery
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 3 Sep 2003 20:08:26 +0000 (20:08 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 3 Sep 2003 20:08:26 +0000 (20:08 +0000)
language)

git-svn-id: file:///home/dpavlin/private/svn/webpac/trunk@122 13eb9ef6-21d5-0310-b721-a9d68796d827

WebPac.pm

index 64c958b..b36fee0 100644 (file)
--- a/WebPac.pm
+++ b/WebPac.pm
@@ -108,7 +108,7 @@ sub show_results_list {
                                        $s.= ($s) ? "and " : "";
                                        $s.="not " if ($1 eq "-");
                                        $s.="$2* ";
                                        $s.= ($s) ? "and " : "";
                                        $s.="not " if ($1 eq "-");
                                        $s.="$2* ";
-                               } elsif (m/(and|or|not)/i) {
+                               } elsif (m/^\s*(and|or|not)\s*$/i) {
                                        $s.="$_ ";
                                # don't add * to words with less than x chars
                                } elsif (length($_) <= $MIN_WILDCARD) {
                                        $s.="$_ ";
                                # don't add * to words with less than x chars
                                } elsif (length($_) <= $MIN_WILDCARD) {