lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Dodsworth (JIRA)" <>
Subject [jira] Created: (LUCENE-1352) trailing escaped backslashes in quoted queries cause parse error
Date Thu, 07 Aug 2008 14:33:44 GMT
trailing escaped backslashes in quoted queries cause parse error

                 Key: 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(

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:
For additional commands, e-mail:

View raw message