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

        Tomislav Gountchev created issue -
        Michael Busch made changes -
        Field Original Value New Value
        Attachment escaped_quotes_inside_phrases.patch [ 12338322 ]
        Michael Busch made changes -
        Assignee Michael Busch [ michaelbusch ]
        Michael Busch made changes -
        Attachment LUCENE-573_new.patch [ 12345250 ]
        Michael Busch made changes -
        Attachment escaped_quotes_inside_phrases.patch [ 12338322 ]
        Michael Busch made changes -
        Lucene Fields [Patch Available]
        Yonik Seeley made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Workflow jira [ 12372155 ] Default workflow, editable Closed status [ 12562291 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12562291 ] jira [ 12583293 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development