SortTest failing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SortTest failing

Otis Gospodnetic-2
Hm, Erik is not alone with unit tests failing.  My HighlighterTest
passes (I didn't do svn update today yet), but I see SortTest failing:

    [junit] Testcase:
testNormalizedScores(org.apache.lucene.search.TestSort):  FAILED
    [junit] expected:<0.375> but was:<0.392445>
    [junit] junit.framework.AssertionFailedError: expected:<0.375> but
was:<0.392445>
    [junit]     at
org.apache.lucene.search.TestSort.assertSameValues(TestSort.java:560)
    [junit]     at
org.apache.lucene.search.TestSort.testNormalizedScores(TestSort.java:365)


Line 365 is this:

assertSameValues (scoresA, getScores(multi.search(queryA,sort)));


And this makes me think that this broke during my last commit of Wolf's
patch for MultiSearcher and docFreq stuff.  However I did run 'ant
test' before commit and did see BUILD SUCCESSFUL, so I'm not 100% sure.
 

Anyone else seeing this error?

Otis


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SortTest failing

Chuck Williams
Otis Gospodnetic wrote:

>Hm, Erik is not alone with unit tests failing.  My HighlighterTest
>passes (I didn't do svn update today yet), but I see SortTest failing:
>
>    [junit] Testcase:
>testNormalizedScores(org.apache.lucene.search.TestSort):  FAILED
>    [junit] expected:<0.375> but was:<0.392445>
>    [junit] junit.framework.AssertionFailedError: expected:<0.375> but
>was:<0.392445>
>    [junit]     at
>org.apache.lucene.search.TestSort.assertSameValues(TestSort.java:560)
>    [junit]     at
>org.apache.lucene.search.TestSort.testNormalizedScores(TestSort.java:365)
>
>
>Line 365 is this:
>
>assertSameValues (scoresA, getScores(multi.search(queryA,sort)));
>
>
>And this makes me think that this broke during my last commit of Wolf's
>patch for MultiSearcher and docFreq stuff.  However I did run 'ant
>test' before commit and did see BUILD SUCCESSFUL, so I'm not 100% sure.
>
>
>Anyone else seeing this error?
>  
>
Otis, I think that is a bug in the test case that Wolf's patch has
exposed. It creates an index consisting of two copies of "full". This
should be equivalent to an index where every document is duplicated
(occurs twice), not to an index where each document occurs only once.
With the new correct idf normalizaiton, this increases all the docfreq's
for the terms, which changes the score. Scores on the duplicated index
should not be the same as scores on the unduplicated index.

Chuck


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SortTest failing

Erik Hatcher
In reply to this post by Otis Gospodnetic-2
On Apr 25, 2005, at 10:55 PM, Otis Gospodnetic wrote:
> Hm, Erik is not alone with unit tests failing.  My HighlighterTest
> passes (I didn't do svn update today yet)

Let me know what happens after you fully update and build the main
Lucene JAR, then run the highlighter build.

> , but I see SortTest failing:
>
>     [junit] Testcase:
> testNormalizedScores(org.apache.lucene.search.TestSort):  FAILED
>
>
> Line 365 is this:
>
> assertSameValues (scoresA, getScores(multi.search(queryA,sort)));
>
>
> And this makes me think that this broke during my last commit of Wolf's
> patch for MultiSearcher and docFreq stuff.  However I did run 'ant
> test' before commit and did see BUILD SUCCESSFUL, so I'm not 100% sure.
>
>
> Anyone else seeing this error?

Yes, I see this same error.

        Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SortTest failing

Wolf Siberski
In reply to this post by Chuck Williams
Chuck Williams wrote:

> Otis Gospodnetic wrote:
>> And this makes me think that this broke during my last commit of Wolf's
>> patch for MultiSearcher and docFreq stuff.  However I did run 'ant
>> test' before commit and did see BUILD SUCCESSFUL, so I'm not 100% sure.
>>
>>
>> Anyone else seeing this error?
>>  
>>
> Otis, I think that is a bug in the test case that Wolf's patch has
> exposed. It creates an index consisting of two copies of "full". This
> should be equivalent to an index where every document is duplicated
> (occurs twice), not to an index where each document occurs only once.
> With the new correct idf normalizaiton, this increases all the docfreq's
> for the terms, which changes the score. Scores on the duplicated index
> should not be the same as scores on the unduplicated index.

Exactly. The test relied on the 'wrong' scoring of the previous MultiSearcher
implementation, and thus fails now. For some reason, the test didn't fail
when I submitted the patch. A correction is included as part of the addition
I submitted recently (http://issues.apache.org/bugzilla/show_bug.cgi?id=31841).

--Wolf


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...