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

FileFloatSource init error while field terms zero

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.3.1, 6.0
    • 4.3.1
    • search
    • None

    Description

      org.apache.solr.search.function.FileFloatSource.getFloats(FileFloatSource, IndexReader)

      line:273
      TermsEnum termsEnum = MultiFields.getTerms(reader, idName).iterator(null);

      while filed(idName) does not have term(for example docnum = 0) ,MultiFields.getTerms will return null, and .iterator(null) will throw java.lang.NullPointerException

      fix it:

      Terms terms = MultiFields.getTerms(reader, idName);
      if (terms == null)
      return vals;
      TermsEnum termsEnum = terms.iterator(null);
      DocsEnum docsEnum = null;

      Attachments

        Activity

          People

            Unassigned Unassigned
            longkeyy longkeyy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: