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

FileFloatSource init error while field terms zero

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.3.1, 6.0
    • Fix Version/s: 4.3.1
    • Component/s: search
    • Labels:
      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

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

              Dates

              • Created:
                Updated: