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

Escaped quotes inside a phrase cause a ParseException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.9
    • None
    • core/queryparser
    • None
    • Debian Sarge, Sun JDK 1.4.2

    • 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

        1. LUCENE-573_new.patch
          31 kB
          Michael Busch

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: