lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: escaping special characters
Date Mon, 11 Aug 2008 18:48:54 GMT
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.
>   
Yeah, this works - it short circuits the token as an operator by 
triggering a quoted match instead - which eventually just pops out the 
single term in the quotes.

But also, have you just tried escaping with a simple backslash? Seems to 
work for me with a simple test.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message