You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2017/11/29 14:54:00 UTC

[jira] [Updated] (LUCENE-8008) reduce/remove usages of CheckHits.EXPLAIN_TOLERANCE_*

     [ https://issues.apache.org/jira/browse/LUCENE-8008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand updated LUCENE-8008:
---------------------------------
    Attachment: LUCENE-8008.patch

Here is a patch that reduces usage of tolerance. CheckHits now enforces that scores and explanations have exactly the same value.

There is still some leniency in explanations that ends with "sum of" due to how {{ReqOptSumScorer}} casts some intermediate contributions to a float before summing them up again. For instance if the query is {{+A +B C D}}, the score will be computed as {{(float) ((double) scoreA + scoreB) + (float) ((double) scoreC + scoreD)}}. This doesn't look easy to fix without making things more complex.

> reduce/remove usages of CheckHits.EXPLAIN_TOLERANCE_*
> -----------------------------------------------------
>
>                 Key: LUCENE-8008
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8008
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-8008.patch
>
>
> these tolerance deltas are being (ab)used in various ways in tests. I did some experimentation and they can almost be removed entirely without too much pain.
> LUCENE-7997 fixes all similarities such that score() == explain(). It makes its possible to actually debug numeric errors and we need to do that if we have optimizations such as maxscore that care about score values. So I think we should do the same thing elsewhere in scoring (weight/scorer).
> We should at the very least fix tests (such as expression tests) that no longer need these deltas and can now assert exact values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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