Solr
  1. Solr
  2. SOLR-4121

balanced single quotes cause parse error in (new) standard QParser

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1, Trunk
    • Component/s: query parsers
    • Labels:
      None

      Description

      The parser changes introduced in SOLR-4093 cause the standard parser to freak out anytime there are blanaced single quotes in a query string.

      the expected behavior is that single quotes should not be considered special to the parser, and should be ignored and passed down to the appropriate field analyzers

      Example of error...
      http://localhost:8983/solr/select?q=%27zz+xx%27&debugQuery=true

      Caused by: org.apache.solr.parser.ParseException: Encountered " <SQUOTED> "\'zz xx\' "" at line 1, column 0.
      Was expecting one of:
          <NOT> ...
          "+" ...
          "-" ...
          <BAREOPER> ...
          "(" ...
          "*" ...
          <QUOTED> ...
          <TERM> ...
          <PREFIXTERM> ...
          <WILDTERM> ...
          <REGEXPTERM> ...
          "[" ...
          "{" ...
          <LPARAMS> ...
          <NUMBER> ...
          <TERM> ...
          "*" ...
          
      	at org.apache.solr.parser.QueryParser.generateParseException(QueryParser.java:649)
      	at org.apache.solr.parser.QueryParser.jj_consume_token(QueryParser.java:531)
      	at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:216)
      	at org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
      	at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96)
      	at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:159)
      

        Issue Links

          Activity

          Steve Rowe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Yonik Seeley made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mark Miller made changes -
          Fix Version/s 5.0 [ 12321664 ]
          Shawn Heisey made changes -
          Attachment SOLR-4121-test.patch [ 12562605 ]
          Hoss Man made changes -
          Field Original Value New Value
          Link This issue is broken by SOLR-4093 [ SOLR-4093 ]
          Hoss Man created issue -

            People

            • Assignee:
              Yonik Seeley
              Reporter:
              Hoss Man
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development