You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Helmut Jarausch <ja...@igpm.rwth-aachen.de> on 2007/12/14 13:28:19 UTC

QueryParser: if key contains a colon

Hi,

how can one search for a key containing a colon when
using QueryParser (with WhitespaceAnalyzer)

E.g.
searching for   'abc:def'

Giving this string to QueryParser's parse
method, abc: will be misinterpreted as the name
of a field. How can this be avoided?
Is there something like an escape technique?

Many thanks for a hint,
Helmut.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany


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


Re: QueryParser: if key contains a colon

Posted by Erick Erickson <er...@gmail.com>.
This should help

http://lucene.apache.org/java/docs/queryparsersyntax.html

Erick

On Dec 14, 2007 7:28 AM, Helmut Jarausch <ja...@igpm.rwth-aachen.de>
wrote:

> Hi,
>
> how can one search for a key containing a colon when
> using QueryParser (with WhitespaceAnalyzer)
>
> E.g.
> searching for   'abc:def'
>
> Giving this string to QueryParser's parse
> method, abc: will be misinterpreted as the name
> of a field. How can this be avoided?
> Is there something like an escape technique?
>
> Many thanks for a hint,
> Helmut.
>
> --
> Helmut Jarausch
>
> Lehrstuhl fuer Numerische Mathematik
> RWTH - Aachen University
> D 52056 Aachen, Germany
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>