jpountz commented on code in PR #907: URL: https://github.com/apache/lucene/pull/907#discussion_r896529395
########## lucene/codecs/src/java/org/apache/lucene/codecs/bloom/BloomFilteringPostingsFormat.java: ########## @@ -200,8 +200,8 @@ public Terms terms(String field) throws IOException { return delegateFieldsProducer.terms(field); } else { Terms result = delegateFieldsProducer.terms(field); - if (result == null) { - return null; + if (result == null || result == Terms.EMPTY) { Review Comment: This case is a bit special indeed, but I think we should fix it too to make sure that it only returns a `null` `Terms` instance if the field doesn't exist (fieldInfo == null) or if the field doesn't index terms (indexOptions == NONE). -- 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