spike-liu commented on a change in pull request #678:
URL: https://github.com/apache/lucene/pull/678#discussion_r807561090
##########
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:
Absolutely. 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]