Lucene - Core
  1. Lucene - Core
  2. LUCENE-573

Escaped quotes inside a phrase cause a ParseException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor 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

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development