Date: Fri, 11 Jun 2004 11:46:59 +1000
From: lachlan_andrew@iprimus.com.au
To: Joe R. Jah <jjah@cloud.ccsf.cc.ca.us>,
     Christopher Murtagh <christopher.murtagh@mcgill.ca>
Cc: htdig-dev@lists.sourceforge.net
Subject: Re: [htdig-dev] boolean terms in phrase - bug?

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.


--- 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;
 }
