mirror of https://github.com/apache/lucene.git
LUCENE-8931: Remove Custom ScoreDoc Equality Method (#806)
This commit is contained in:
parent
dc8e9afff9
commit
29f941baa2
|
@ -160,7 +160,7 @@ public class TestTopFieldCollectorEarlyTermination extends LuceneTestCase {
|
|||
} else {
|
||||
assertEquals(td2.totalHits.value, td1.totalHits.value);
|
||||
}
|
||||
assertTopDocsEquals(td1.scoreDocs, td2.scoreDocs);
|
||||
CheckHits.checkEqual(query, td1.scoreDocs, td2.scoreDocs);
|
||||
}
|
||||
closeIndex();
|
||||
}
|
||||
|
@ -233,14 +233,4 @@ public class TestTopFieldCollectorEarlyTermination extends LuceneTestCase {
|
|||
new Sort(new SortField("a", SortField.Type.LONG), new SortField("b", SortField.Type.STRING)),
|
||||
new Sort(new SortField("c", SortField.Type.LONG), new SortField("b", SortField.Type.STRING))));
|
||||
}
|
||||
|
||||
private static void assertTopDocsEquals(ScoreDoc[] scoreDocs1, ScoreDoc[] scoreDocs2) {
|
||||
assertEquals(scoreDocs1.length, scoreDocs2.length);
|
||||
for (int i = 0; i < scoreDocs1.length; ++i) {
|
||||
final ScoreDoc scoreDoc1 = scoreDocs1[i];
|
||||
final ScoreDoc scoreDoc2 = scoreDocs2[i];
|
||||
assertEquals(scoreDoc1.doc, scoreDoc2.doc);
|
||||
assertEquals(scoreDoc1.score, scoreDoc2.score, 0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue