|
|
-
Searching for a phrase that contains quote characterdanrapp@... 2004-03-24, 21:25
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 --------------------------------------------------------------------- +
Will Allen 2004-10-28, 16:02
|