LUCENE-8825: Improve CheckHits's Printing Capabilities

Signed-off-by: Adrien Grand <jpountz@gmail.com>
This commit is contained in:
Atri Sharma 2019-06-04 16:34:51 +05:30 committed by Adrien Grand
parent 85f4029c5c
commit 965fd194d1
2 changed files with 8 additions and 2 deletions

View File

@ -80,6 +80,11 @@ Improvements
* LUCENE-8818: Fix smokeTestRelease.py encoding bug (janhoy)
Test Framework
* LUCENE-8825: CheckHits now display the shard index in case of mismatch
between top hits. (Atri Sharma via Adrien Grand)
======================= Lucene 8.1.1 =======================
(No Changes)

View File

@ -232,14 +232,15 @@ public class CheckHits {
for (int i=start; i<end; i++) {
sb.append("hit=").append(i).append(':');
if (i<len1) {
sb.append(" doc").append(hits1[i].doc).append('=').append(hits1[i].score);
sb.append(" doc").append(hits1[i].doc).append('=').append(hits1[i].score).append(" shardIndex=").append(hits1[i].shardIndex);
} else {
sb.append(" ");
}
sb.append(",\t");
if (i<len2) {
sb.append(" doc").append(hits2[i].doc).append('=').append(hits2[i].score);
sb.append(" doc").append(hits2[i].doc).append('=').append(hits2[i].score).append(" shardIndex=").append(hits2[i].shardIndex);
}
sb.append('\n');
}
return sb.toString();