You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2014/11/03 23:57:35 UTC

[jira] [Commented] (LUCENE-6042) CustomScoreQuery Explain differs from the actual score when topLevelBoost is used.

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

Robert Muir commented on LUCENE-6042:
-------------------------------------

Thanks! At a quick glance, the patch seems correct.
I think we can test it with some of the infra used for core search tests.  The explanations tests are good there.

> CustomScoreQuery Explain differs from the actual score when topLevelBoost is used.
> ----------------------------------------------------------------------------------
>
>                 Key: LUCENE-6042
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6042
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/query/scoring
>    Affects Versions: 4.8
>            Reporter: Denis Lantsman
>            Priority: Minor
>         Attachments: CustomScoreQuery.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> CustomScoreQuery.java, doExplain has the following line:
> {code}
> res.addDetail(new Explanation(getBoost(), "queryBoost"));
> {code}
> This multiplies the custom score query by just the boost of the current query, and not by
> {code}
> queryWeight=topLevelBoost*getBoost();
> {code}
> which is the value that's actually used during scoring. This leads to drastically different scores in the debug info, relative to the actual score, when the query is a subquery of another one, like a BooleanQuery clause, with a non-1 boost.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org