Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3823

Parentheses in a boost query cause errors

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.0-BETA
    • Fix Version/s: 4.0, 6.0
    • Component/s: query parsers
    • Labels:
      None
    • Environment:

      Mac, jdk 1.6, Chrome

      Description

      When using a boost query (bq) that contains a parentheses (like this example from the Relevancy Cookbook section of the wiki):

       ? defType = dismax 
          & q = foo bar 
          & bq = (*:* -xxx)^999 
      

      You get the following error:

      org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'xxx)': Encountered " ")" ") "" at line 1, column 12. Was expecting one of: <EOF> <AND> ... <OR> ... <NOT> ... "+" ... "" ... <BAREOPER> ... "(" ... "*" ... "^" ... <QUOTED> ... <TERM> ... <FUZZY_SLOP> ... <PREFIXTERM> ... <WILDTERM> ... <REGEXPTERM> ... "[" ... "{" ... <NUMBER> ...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hossman Hoss Man
                Reporter:
                mathos Mathos Marcer
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: