Re: boolean terms in phrase - bug?

[email protected]
Newsgroups gmane.comp.web.htdig.devel
Message-ID <[email protected]>
Greetings all,

The attached patch should get things working.

Thanks again, Chris, for pointing this bug out.

Cheers,
Lachlan


>-- Original Message --
>On Wed, 9 Jun 2004, Christopher Murtagh wrote:
>
>>  That's what I thought. Thanks for the feedback. In my position, I'm
>> fortunate that I have a php wrapper that is cleaning up all input before
>> it is sent to htsearch, so I can write a little function that will strip
>> these. However, it might be a good idea for the htdig team to let other
>> folks who are currently using 3.2 in production about this as this makes
>> it easy to cripple any machine running htdig 3.2 with boolean search
>> feature.
boolean-patch (text/x-diff, 411 B)
--- parser.cc-orig	Fri Jun 11 11:35:32 2004
+++ parser.cc	Fri Jun 11 11:38:16 2004
@@ -256,7 +256,14 @@
 	     setError(boolean_syntax_errors[QUOTE]);
 	     break;
            }
-
+	  else
+	   {
+	     // skip '&' '|' and '!' in the phrase
+	      current->isIgnore = 1;
+	      if (output)
+		perform_phrase(wordList);
+	      lookahead = lexan ();
+	   }
 	} // end while
 	if(wordList) delete wordList;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.