mirror of https://github.com/apache/lucene.git
Fix test TestKnnByteVectorQuery.testToString (#13134)
Co-authored-by: Shubham Chaudhary <cshbha@amazon.com>
This commit is contained in:
parent
ca06693a16
commit
6eba1fb537
|
@ -442,7 +442,7 @@ abstract class AbstractKnnVectorQuery extends Query {
|
|||
|
||||
@Override
|
||||
public String toString(String field) {
|
||||
return "DocAndScoreQuery[" + docs[0] + ",...][" + scores[0] + ",...]";
|
||||
return "DocAndScoreQuery[" + docs[0] + ",...][" + scores[0] + ",...]," + maxScore;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -842,8 +842,8 @@ abstract class BaseKnnVectorQueryTestCase extends LuceneTestCase {
|
|||
// The string should contain matching docIds and their score.
|
||||
// Since a forceMerge could occur in this test, we must not assert that a specific doc_id is
|
||||
// matched
|
||||
// But that instead the string format is expected and that the score is 1.0
|
||||
assertTrue(queryString.matches("DocAndScoreQuery\\[\\d+,...]\\[1.0,...]"));
|
||||
// But that instead the string format is expected and that the max score is 1.0
|
||||
assertTrue(queryString.matches("DocAndScoreQuery\\[\\d+,...]\\[\\d+.\\d+,...],1.0"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue