gsmiller commented on a change in pull request #678: URL: https://github.com/apache/lucene/pull/678#discussion_r808256634
########## File path: lucene/core/src/java/org/apache/lucene/document/FeatureQuery.java ########## @@ -111,12 +111,9 @@ public Explanation explain(LeafReaderContext context, int doc) throws IOExceptio @Override public Scorer scorer(LeafReaderContext context) throws IOException { - Terms terms = context.reader().terms(fieldName); - if (terms == null) { - return null; - } + Terms terms = Terms.terms(context.reader(), fieldName); TermsEnum termsEnum = terms.iterator(); - if (termsEnum.seekExact(new BytesRef(featureName)) == false) { + if (!termsEnum.seekExact(new BytesRef(featureName))) { Review comment: As a side note, in case it's helpful, I know with IntelliJ at least you can disable the suggestion it likes to give to convert all these `== false` occurrences to `!` if that irritates you :) -- 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