Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
New
Description
SimpleNaiveBayesClassifier uses MultiFields.getTerms(leafReader, classFieldName). but doesn't check if the resulting Terms is null or not.
While that is unlikely to happen (it doesn't make much sense to use a classifier without specifying an existing class field), it may happen during testing and therefore better to avoid throwing a NPE.