Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10836

TextLogisticRegression parser (and others) assume non-empty index.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 6.7, 7.0
    • None
    • None

    Description

      TextLogisticRegressionQParserPlugin, IGainTermsQParserPlugin and SignificantTermsQParserPlugin are similarly affected:

      finish() contains this line of code:

      Terms terms = MultiFields.getFields(searcher.getIndexReader()).terms(trainingParams.feature);
      

      Instead I think it should be this:

      Terms terms = ((SolrIndexSearcher)searcher).getSlowAtomicReader().terms(trainingParams.feature);
      

      MultiFields can take some time to build and Solr (via SlowAtomicReader) has already done this work.

      In addition, the code assumes Terms is non-null when in fact it will be null if there's no data.

      Attachments

        Activity

          People

            dsmiley David Smiley
            dsmiley David Smiley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: