You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2012/09/11 20:58:07 UTC
[jira] [Updated] (SOLR-3823) Parentheses in a boost query cause
errors
[ https://issues.apache.org/jira/browse/SOLR-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-3823:
---------------------------
Description:
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> ...
was:
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> ...
1) editing the issue description to include "noformat" tags -- i think Erick was getting confused by the "\*:\*" showing up as just ":"
2) i can't reproduce the described problem. When i tried using the solr example data, this request worked just fine...
http://localhost:8983/solr/select?q=ipod&defType=dismax&bq=%28*:*%20-id:IW-02%29^999
Mathos: please follow up on the solr-user@lucene mailing list with more details about the problems you are you having and your actual (specific) configs/queries
> 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
>
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org