You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2016/05/26 13:59:13 UTC
[jira] [Updated] (LUCENE-7303) Avoid NPE if classField doesn't
exist in SNBC
[ https://issues.apache.org/jira/browse/LUCENE-7303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tommaso Teofili updated LUCENE-7303:
------------------------------------
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.
was:{{SimpleNaiveBayesClassifier}} uses _MultiFields.getTerms(leafReader, classFieldName)._ but doesn't check if the resulting _Terms_ is null or not.
> Avoid NPE if classField doesn't exist in SNBC
> ---------------------------------------------
>
> Key: LUCENE-7303
> URL: https://issues.apache.org/jira/browse/LUCENE-7303
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/classification
> Reporter: Tommaso Teofili
> Assignee: Tommaso Teofili
> Fix For: 6.1
>
>
> {{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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org