mirror of https://github.com/apache/lucene.git
don't divide by 0 in the checkindex status: it totally confuses people to see the \uFFFD for the NaN
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1363379 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b7cbef534c
commit
d408b72f81
|
@ -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 " +
|
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) {
|
} catch (Throwable e) {
|
||||||
msg("ERROR [" + String.valueOf(e.getMessage()) + "]");
|
msg("ERROR [" + String.valueOf(e.getMessage()) + "]");
|
||||||
status.error = e;
|
status.error = e;
|
||||||
|
|
Loading…
Reference in New Issue