FAQ
Hi,
I am building queries using the query api and when I use } in my fieldname
and then call toString on the query, QueryParser throws a ParseException
when trying to parse it. How do I fix this?

Regards
Peter Gelderbloem


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

Search Discussions

  • Chris Lamprecht at May 24, 2005 at 5:16 pm
    Hi Peter,

    See the method escape(String s) of QueryParser, it may do what you want.

    On 5/24/05, Peter Gelderbloem wrote:
    Hi,
    I am building queries using the query api and when I use } in my fieldname
    and then call toString on the query, QueryParser throws a ParseException
    when trying to parse it. How do I fix this?

    Regards
    Peter Gelderbloem


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-user-help@lucene.apache.org
  • Peter Gelderbloem at May 25, 2005 at 9:43 am
    Yeah,
    That works

    Thanks
    Peter Gelderbloem
    -----Original Message-----
    From: Chris Lamprecht
    Sent: 24 May 2005 18:16
    To: java-user@lucene.apache.org
    Subject: Re: Query.toString(0 does not escape special characters

    Hi Peter,

    See the method escape(String s) of QueryParser, it may do what you want.

    On 5/24/05, Peter Gelderbloem wrote:
    Hi,
    I am building queries using the query api and when I use } in my fieldname
    and then call toString on the query, QueryParser throws a ParseException
    when trying to parse it. How do I fix this?

    Regards
    Peter Gelderbloem


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


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedMay 24, '05 at 9:19a
activeMay 25, '05 at 9:43a
posts3
users2
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase