romseygeek commented on code in PR #13165:
URL: https://github.com/apache/lucene/pull/13165#discussion_r1537485874
##########
lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/UnifiedHighlighter.java:
##########
@@ -1130,7 +1134,16 @@ public boolean acceptField(String field) {
@Override
public void visitLeaf(Query query) {
if (MultiTermHighlighting.canExtractAutomataFromLeafQuery(query)
== false) {
- if (!(query instanceof MatchAllDocsQuery || query instanceof
MatchNoDocsQuery)) {
+ boolean no_effect_query = false;
Review Comment:
`MatchAllDocsQuery` is already final, but the other two aren't. Maybe this
would be better done as a new protected method, `isIgnorableQuery(Query q)`
with a default implementation of `instanceof` checks, and then if somebody has
their own extension (or another query implementation that will do weird things
here) they can override the method?
--
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]