I'm having a problem getting the QueryParser to correctly parse a string
like the following:
addr:"Foo \"Bar\" Street"
Should this work, or is there some other way to escape double quotes
within a quoted query term? Here is a unit test that shows the problem:
import junit.framework.TestCase;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.search.Query;
public class TestQueryParser extends TestCase {
public void testLuceneEscapedQuotesBug() throws Exception {
// this fails
Query q = new QueryParser("foo",new StandardAnalyzer()).parse(
"addr:\"My \\\"A\\\" Street\"");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]