Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-573

Escaped quotes inside a phrase cause a ParseException

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: None
    • Component/s: core/queryparser
    • Labels:
      None
    • Environment:

      Debian Sarge, Sun JDK 1.4.2

    • Lucene Fields:
      Patch Available

      Description

      QueryParser cannot handle escaped quotes when inside a phrase. Escaped quotes not in a phrase are not a problem. This can be added to TestQueryParser.testEscaped() to demonstrate the issue - the second assert throws an exception:

      assertQueryEquals("a \\\"b c\\\" d", a, "a \"b c\" d");
      assertQueryEquals("\"a \\\"b c\\\" d\"", a, "\"a \"b c\" d\"");

      See also this thread:
      http://www.nabble.com/ParseException-with-escaped-quotes-in-a-phrase-t1647115.html

        Attachments

          Activity

            People

            • Assignee:
              michaelbusch Michael Busch
              Reporter:
              tomi Tomislav Gountchev
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: