apanimesh061 commented on a change in pull request #412:
URL: https://github.com/apache/lucene/pull/412#discussion_r739867508



##########
File path: 
lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/UnifiedHighlighter.java
##########
@@ -207,18 +342,22 @@ public void setFieldMatcher(Predicate<String> predicate) {
   }
 
   /**
-   * Returns whether {@link MultiTermQuery} derivatives will be highlighted. 
By default it's
-   * enabled. MTQ highlighting can be expensive, particularly when using 
offsets in postings.
+   * Returns the predicate to use for extracting the query part that must be 
highlighted. By default
+   * only queries that target the current field are kept. (AKA 
requireFieldMatch)
    */
+  protected Predicate<String> getFieldMatcher(String field) {

Review comment:
       Yes you are right but ideally the getter should be `getFieldMatcher()` 
and not depend on the `field` argument? In case the input value was null, the 
output depends on the `field` argument (`(qf) -> field.equals(qf)`)




-- 
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

Reply via email to