You can simply change your input string to lowercase before passing it to the analyzers, which will give you the effect of escaping the boolean operators. (I.E you will now search on and or and not) Remember however that these are extremely common words, and chances are high that you are removing them via your stop words list in your analyzer. This is also assuming you are using an analyzer that does lowercasing as part of its normal processing, which many do.

Matt

Steven A Rowe wrote:
On 08/11/2008 at 2:14 PM, Chris Hostetter wrote:
Aravind R Yarram wrote:
can i escape built in lucene keywords like OR, AND aswell?
as of the last time i checked: no, they're baked into the grammer.

I have not tested this, but I've read somewhere on this list that enclosing OR 
and AND in double quotes effectively escapes them.

(that may have changed when it switchedfrom a javac to a flex grammer
though, so i'm not 100% positive)

Although the StandardTokenizer was switched about a year ago from a JavaCC to a 
JFlex grammar, QueryParser's grammar remains in the JavaCC camp.

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Matthew Hall
Software Engineer
Mouse Genome Informatics
[EMAIL PROTECTED]
(207) 288-6012



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to