I'd like to search for a phrase that contains the quote character. I've tried 
escaping the quote character, but am receiving a ParseException from the 
QueryParser:

For example to search for the phrase:

     this is a "test"

I'm trying the following

     QueryParser.parse("field:\"This is a \\\"test\\\"\"", "field", new 
StandardAnalyzer());

This results in:

org.apache.lucene.queryParser.ParseException: Lexical error at line 1, column 31.  
Encountered: <EOF> after : ""
        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:111)
        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:87)
        ...

What is the proper way to accomplish this?

--Dan

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

Reply via email to