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: (LUCENE-2936) score and explain don't match
Date Fri, 25 Feb 2011 00:39:38 GMT

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

Hoss Man commented on LUCENE-2936:
----------------------------------

bq. Hoss's assumption is correct because the problem was found at customer site when they
used a BooleanQuery containing PhraseQueries (term query on 1-gram fields)

sure .. but to be clear: the crux of the issue was really a bug in PhraseQuery -- it wasn't
correctly identifying where there was a match/non-match (independently of when the score was
zero/non-zero).

the reason my initial attempt at exposing the bug (by setting an index boost of 0 on some
of the fields) didn't cause any of the existing TestSimpleExplanations.testP* to fail was
because of the bugs i mentioned in in CheckHits (it was naively looking at hte score to verify
when an explanation was for a match/non-match) so the bug didn't show up in the testP* methods
until i fixed that.  It did show up in the "testMultiFieldBQofPQ*" methods i added because
BooleanQuery's explain logic was actually modifying the score of it's explanation based on
the match value of the explanation for the sub-queries (because of coord)

> score and explain don't match
> -----------------------------
>
>                 Key: LUCENE-2936
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2936
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.4, 3.0.3, 3.1, 4.0
>            Reporter: Koji Sekiguchi
>            Assignee: Hoss Man
>            Priority: Minor
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2936.patch, LUCENE-2936.patch, LUCENE-2936.patch, LUCENE-2936.test.patch,
TestScore.java
>
>
> I've faced this problem recently. I'll attach a program to reproduce the problem soon.
The program outputs the following:
> {noformat}
> ** score = 0.10003257
> ** explain
> 0.050016284 = (MATCH) product of:
>   0.15004885 = (MATCH) sum of:
>     0.15004885 = weight(f1:"note book" in 0), product of:
>       0.3911943 = queryWeight(f1:"note book"), product of:
>         0.61370564 = idf(f1: note=1 book=1)
>         0.6374299 = queryNorm
>       0.38356602 = fieldWeight(f1:"note book" in 0), product of:
>         1.0 = tf(phraseFreq=1.0)
>         0.61370564 = idf(f1: note=1 book=1)
>         0.625 = fieldNorm(field=f1, doc=0)
>   0.33333334 = coord(1/3)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
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