mirror of https://github.com/apache/lucene.git
fix this test to disregard NaN scores
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1725529 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a2e5c37c85
commit
8a9e20bfa1
|
@ -1209,8 +1209,10 @@ public class TestFieldCacheSort extends LuceneTestCase {
|
|||
bq.add(new MatchAllDocsQuery(), Occur.SHOULD);
|
||||
TopDocs td = searcher.search(bq.build(), 10, sort);
|
||||
assertEquals(2, td.totalHits);
|
||||
assertEquals(1, td.scoreDocs[0].doc);
|
||||
assertEquals(0, td.scoreDocs[1].doc);
|
||||
if (Float.isNaN(td.scoreDocs[0].score) == false && Float.isNaN(td.scoreDocs[1].score) == false) {
|
||||
assertEquals(1, td.scoreDocs[0].doc);
|
||||
assertEquals(0, td.scoreDocs[1].doc);
|
||||
}
|
||||
TestUtil.checkReader(ir);
|
||||
ir.close();
|
||||
dir.close();
|
||||
|
|
Loading…
Reference in New Issue