You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2019/06/07 16:47:58 UTC
[lucene-solr] branch branch_8x updated: LUCENE-8825: Improve
CheckHits's Printing Capabilities
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 131b7bf LUCENE-8825: Improve CheckHits's Printing Capabilities
131b7bf is described below
commit 131b7bfbe5aa6bc5102de95689f714404a0cccd5
Author: Atri Sharma <at...@apache.org>
AuthorDate: Tue Jun 4 16:34:51 2019 +0530
LUCENE-8825: Improve CheckHits's Printing Capabilities
Signed-off-by: Adrien Grand <jp...@gmail.com>
---
lucene/CHANGES.txt | 5 +++++
.../test-framework/src/java/org/apache/lucene/search/CheckHits.java | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index fddea67..f44c845 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -46,6 +46,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)
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java b/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
index b015e15..36a77fb 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/CheckHits.java
@@ -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();