trailing escaped backslashes in quoted queries cause parse error
----------------------------------------------------------------
Key: LUCENE-1352
URL: https://issues.apache.org/jira/browse/LUCENE-1352
Project: Lucene - Java
Issue Type: Bug
Components: QueryParser
Affects Versions: 2.3.2
Environment: Ubuntu 7.04, Sun JVM 1.5.0_1
Reporter: Michael Dodsworth
The QueryParser fails to parse queries that contain escaped backslashes
followed by a closing double-quote, then an opening double-quote (as part of
another term).
For example, the query:
tagOrig:"testing\\" title:"titleTest"
will fail with the exception:
org.apache.lucene.queryParser.ParseException: Cannot parse 'tagOrig:"testing\\"
title:"titleTest"': Lexical error at line 1, column 38. Encountered: <EOF>
after : ""
at
org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:155)
at
org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:79)
After digging around, I found that 'QueryParserTokenManager:jjMoveNfa_3' is
generating - 'testing\\\" title:' as the token following the opening quote. It
should be generating 'testing\\'; it appears to see the first double-quote as
being escaped by the preceding slashes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]