[
https://issues.apache.org/jira/browse/SOLR-3823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erick Erickson reopened SOLR-3823:
----------------------------------
Thanks, Hoss, you're right...
But I can get this to fail both with BETA and today's trunk with the example
data.
{noformat}
http://localhost:8983/solr/select?q=foo&defType=edismax&bq=(name:nonsense
-xxx)^999
{noformat}
Interestingly this works: (note the space after "bq"),
{noformat}
http://localhost:8983/solr/select?q=foo&defType=edismax&bq =(name:nonsense
-xxx)^999
{noformat}
This fails (spaces around parens, there was an issue with non-space parens
lately, but apparently it's unrelated.)
{noformat}
http://localhost:8983/solr/select?q=foo&defType=edismax&bq= ( name:nonsense
-xxx ) ^999
{noformat}
Stack trace from log:
Caused by: org.apache.lucene.queryparser.classic.ParseException: Encountered
"<EOF>" at line 1, column 1.
Was expecting one of:
<NOT> ...
"+" ...
"-" ...
<BAREOPER> ...
"(" ...
"*" ...
<QUOTED> ...
<TERM> ...
<PREFIXTERM> ...
<WILDTERM> ...
<REGEXPTERM> ...
"[" ...
"{" ...
<NUMBER> ...
<TERM> ...
"*" ...
at
org.apache.lucene.queryparser.classic.QueryParser.generateParseException(QueryParser.java:708)
at
org.apache.lucene.queryparser.classic.QueryParser.jj_consume_token(QueryParser.java:590)
at
org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:275)
at
org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:181)
at
org.apache.lucene.queryparser.classic.QueryParser.Clause(QueryParser.java:261)
at
org.apache.lucene.queryparser.classic.QueryParser.Query(QueryParser.java:181)
at
org.apache.lucene.queryparser.classic.QueryParser.TopLevelQuery(QueryParser.java:170)
at
org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:120)
... 35 more
Sep 11, 2012 12:37:58 PM org.apache.solr.core.SolrCore execute
INFO: [collection1] webapp=/solr path=/select
params={q=foo&defType=edismax&bq=+(+name:nonsense+-xxx+)+^999} status=400
QTime=2
> 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: [email protected]
For additional commands, e-mail: [email protected]