[ 
https://issues.apache.org/jira/browse/SOLR-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13454028#comment-13454028
 ] 

James Dyer commented on SOLR-3823:
----------------------------------

Hoss,

I appreciate you fixing this, but I would rather get a fix that preserves the 
negative boost support (SOLR-3278).  I guess I don't understand the bug this 
issue was addressing.  Is it simply that "bq" would fail if extra whitespace 
was in the query?  Could we write a failing testcase for that?  Do you see a 
reason why it would be difficult to fix this and retain the negative boosts?

The discussion of LUCENE-4378 is pertinent:  we have products in our index that 
we either do not sell or we know most of our customer do not want.  Yet they 
often score very high.  The only way I can reliably prevent these from becoming 
top hits is to use a negative boost.  I would imagine this is a frequent 
requirement.

I'm more than willing to contribute for this, but I couldn't tell that this 
issue was an actual problem or a case of users putting whitespace where it 
doesn't belong and prior versions being more forgiving.
                
> Parentheses in a boost query cause errors
> -----------------------------------------
>
>                 Key: SOLR-3823
>                 URL: https://issues.apache.org/jira/browse/SOLR-3823
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0-BETA
>         Environment: Mac, jdk 1.6, Chrome
>            Reporter: Mathos Marcer
>            Assignee: Hoss Man
>             Fix For: 4.0, 5.0
>
>
> When using a boost query (bq) that contains a parentheses (like this example 
> from the Relevancy Cookbook section of the wiki):
> {noformat}
>  ? defType = dismax 
>     & q = foo bar 
>     & bq = (*:* -xxx)^999 
> {noformat}
> 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> ...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to