If "and" is badworded (as default) but "or" isn't (should be no
need to, as it is less than minimum_word_length), then if your
search is "boolean", you will get "dog or or cat" in the
$(WORDS) variable (as in the default string to search for next)
on the resulting page.

Maybe badWords.IsValid() should not have returned true for "or", as it
does not meet the minimum_word_length, but if so, that's another bug.

Sun Jan 10 20:53:22 1999  Hans-Peter Nilsson  <[EMAIL PROTECTED]>

        * htsearch/htsearch.cc (setupWords): Do not test and insert
        boolean words if word is already valid.

Index: htsearch.cc
===================================================================
RCS file: /opt/htdig/cvs/htdig3/htsearch/htsearch.cc,v
retrieving revision 1.18
diff -p -c -r1.18 htsearch.cc
*** htsearch.cc 1998/12/19 16:55:11     1.18
--- htsearch.cc 1999/01/10 20:00:28
*************** setupWords(char *allWords, List &searchW
*** 419,428 ****
        }
        if (badWords.IsValid(p))
            parsedWords << p << ' ';
!       if (boolean && ((mystrncasecmp(p, "or", 2) == 0) || 
!                       (mystrncasecmp(p, "and", 3) == 0) ||
!                       (mystrncasecmp(p, "not", 3) == 0)))
            parsedWords << p << ' ';
      }
  
      parsedWords.chop(' ');
--- 419,430 ----
        }
        if (badWords.IsValid(p))
            parsedWords << p << ' ';
!         else if (boolean && ((mystrncasecmp(p, "or", 2) == 0) || 
!                              (mystrncasecmp(p, "and", 3) == 0) ||
!                              (mystrncasecmp(p, "not", 3) == 0)))
!         {
            parsedWords << p << ' ';
+         }
      }
  
      parsedWords.chop(' ');

brgds, H-P
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.

Reply via email to