longkeyy created SOLR-7000:
------------------------------

             Summary: FileFloatSource init error while field terms zero
                 Key: SOLR-7000
                 URL: https://issues.apache.org/jira/browse/SOLR-7000
             Project: Solr
          Issue Type: Bug
          Components: search
    Affects Versions: 4.3.1, Trunk
            Reporter: longkeyy
             Fix For: 4.3.1


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;





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to