Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-4782

Let the NaiveBayes classifier have a fallback docCount method if codec doesn't support Terms#docCount()

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2, 6.0
    • modules/classification
    • None
    • New

    Description

      In SimpleNaiveBayesClassifier docsWithClassSize variable is initialized to MultiFields.getTerms(this.atomicReader, this.classFieldName).getDocCount() which may be -1 if the codec doesn't support doc counts, therefore there should be an alternative way to initialize such a variable with the documents count.

      Attachments

        Activity

          People

            teofili Tommaso Teofili
            teofili Tommaso Teofili
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: