Hi,

You can escape the query parser keywords: Holland \OR Germany

This way the query parser will interpret it as as term instead of a boolean
operator.

Regards,
Adriano Crestani

On Fri, Aug 28, 2009 at 3:51 AM, utuncdemir <cam...@gmail.com> wrote:

>
> Hello
>
> When search term has word 'OR', Lucene throws an ParseException but here
> the
> term 'OR' is not searched for to be interpreted by condition in query
> intentionally.The needs is simple to get the lucene document which has text
> for example ' Holland OR Germany '.in other words when i search for
> 'Holland
> OR Germany' for example, i dont want the lucene documents which contains
> either text 'Holland' or 'Germany'.I want simply the document which has
> exactly containing the text ' Holland OR Germany '.I want the 'OR' term
> interpreted as usual string not search operator in Lucene.
>
> When i try same with Luke, also i am having same problem there.
>
> How can i avoid this and make Lucene interpret search operators in its own
> implementation as simple text ?
>
> Thank you in advance.
> --
> View this message in context:
> http://www.nabble.com/ParseException-tp25185575p25185575.html
> Sent from the Lucene - Java Developer mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>
>

Reply via email to