Apache Lucene open-source search software
don't divide by 0 in the checkindex status: it totally confuses people to see the \uFFFD for the NaN
Robert Muird408b72f817c
diff --git a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.javaindex ed22b5b2c10..90be0a295a7 100644--- a/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java+++ b/lucene/core/src/java/org/apache/lucene/index/CheckIndex.java@@ -1601,8 +1601,9 @@ public class CheckIndex {}}}+ float vectorAvg = status.docCount == 0 ? 0 : status.totVectors / (float)status.docCount;msg("OK [" + status.totVectors + " total vector count; avg " +- format.format((((float) status.totVectors) / status.docCount)) + " term/freq vector fields per doc]");+ format.format(vectorAvg) + " term/freq vector fields per doc]");} catch (Throwable e) {msg("ERROR [" + String.valueOf(e.getMessage()) + "]");status.error = e;