spike-liu commented on a change in pull request #678: URL: https://github.com/apache/lucene/pull/678#discussion_r807561320
########## File path: lucene/queries/src/java/org/apache/lucene/queries/function/IndexReaderFunctions.java ########## @@ -212,10 +212,10 @@ private TermFreqDoubleValuesSource(Term term) { @Override public DoubleValues getValues(LeafReaderContext ctx, DoubleValues scores) throws IOException { - Terms terms = ctx.reader().terms(term.field()); - TermsEnum te = terms == null ? null : terms.iterator(); + Terms terms = Terms.terms(ctx.reader(), term.field()); + TermsEnum te = terms.iterator(); - if (te == null || te.seekExact(term.bytes()) == false) { + if (!te.seekExact(term.bytes())) { Review comment: fixed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org