lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3823) Parentheses in a boost query cause errors
Date Mon, 17 Sep 2012 23:35:07 GMT

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

Hoss Man commented on SOLR-3823:
--------------------------------

bq. Sorry to chime in after this issue has been marked as resolved, but .... it doesn't seem
right to me that bq is parsed with the defType specified parser. 

I don't understand this comment -- I see no evidence that "bq" is incorrectly using the defType
parser in either dismax or edismax.

In both cases null is passed to the subQuery() call for bq allowing it inherit the defTYpe
from the _localparams_ of the main "q" string (which is appropriate since the bq is an implicit
subquery added to the main query) but not a global defType.  ie, in the first example below,
the "lucene" parser would be used to parse the bq, while in the second example the "yyy" parser
would be used because of the explicit defType localparam...

{noformat}
/select?qf=name+text&defType=xxx&q={!edismax}mainquery&bq=myboost

/select?qf=name+text&defType=xxx&q={!edismax defType=yyy}mainquery&bq=myboost
{noformat}

...this is how subqueries have always worked with QParsers.  if you think this should be reconsidered,
please open a specific issue.

(NOTE: fq's are not subqueries of the main query, so they don't look at the "q" at all)


                
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message