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:
Robert Muir 2012-07-19 15:21:12 +00:00
parent b7cbef534c
commit d408b72f81
1 changed files with 2 additions and 1 deletions

View File

@ -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;