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

Parentheses in a boost query cause errors

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0-BETA
    • 4.0, 6.0
    • query parsers
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hossman Chris M. Hostetter
            mathos Mathos Marcer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment