Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.5.4
-
None
-
None
Description
If an exception is thrown below, it will exit the while loop, therefore stopping building of the suggester index. In fact, it will not build anything, because the exception is not handled in any way. This is highly unacceptable, because in an enterprise environment there will always be data that does not conform to the expected rules.
while (true) {
BytesRef term = termsEnum.next();
if (term == null)
int ngramCount = countGrams(term);
if (ngramCount > grams)
if (ngramCount == 1)
{ totTokens += termsEnum.totalTermFreq(); } builder.add(Util.toIntsRef(term, scratchInts), encodeWeight(termsEnum.totalTermFreq()));
}