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/12 02:21:07 UTC
[jira] [Updated] (LUCENE-4378) QueryParsers do not support negative
boosts
[ https://issues.apache.org/jira/browse/LUCENE-4378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated LUCENE-4378:
-----------------------------
Attachment: LUCENE-4378-test.patch
patch includes a testcase demonstrating the basic problem. example stack traces...
{noformat}
[junit4:junit4] > Throwable #1: INVALID_SYNTAX_CANNOT_PARSE: Syntax Error, cannot parse foo^-3: Lexical error at line 1, column 5. Encountered: "-" (45), after : ""
[junit4:junit4] > at __randomizedtesting.SeedInfo.seed([49CF3A1EAABC55F0:1AED92BFB422F3DE]:0)
[junit4:junit4] > at org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser.parse(StandardSyntaxParser.java:74)
[junit4:junit4] > at org.apache.lucene.queryparser.flexible.core.QueryParserHelper.parse(QueryParserHelper.java:250)
[junit4:junit4] > at org.apache.lucene.queryparser.flexible.standard.StandardQueryParser.parse(StandardQueryParser.java:168)
[junit4:junit4] > at org.apache.lucene.queryparser.flexible.standard.TestStandardQP.parse(TestStandardQP.java:51)
{noformat}
{noformat}
[junit4:junit4] > Throwable #1: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'foo^-3': Lexical error at line 1, column 5. Encountered: "-" (45), after : ""
[junit4:junit4] > at __randomizedtesting.SeedInfo.seed([49CF3A1EAABC55F0:1AED92BFB422F3DE]:0)
[junit4:junit4] > at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:126)
[junit4:junit4] > at org.apache.lucene.queryparser.classic.TestQueryParser.getQuery(TestQueryParser.java:80)
{noformat}
> QueryParsers do not support negative boosts
> -------------------------------------------
>
> Key: LUCENE-4378
> URL: https://issues.apache.org/jira/browse/LUCENE-4378
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Hoss Man
> Attachments: LUCENE-4378-test.patch
>
>
> Negative query boosts have been supported at the "Query" object level for a long time (resulting in negative scores for matching documents), but evidently we never updated the QueryParsers to know about this - attempting to specify a negative boost in the query string results in a parse error.
> we should probably add this to the parser grammer(s)
--
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