dsmiley commented on a change in pull request #412: URL: https://github.com/apache/lucene/pull/412#discussion_r739877069
########## 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: Ah; I see. So we can have the defaultFieldMatcher in the builder, at least. Intentionally, many protected methods on UnifiedHighlighter take a field argument because the choice can be field-dependent. It'd be too awkward to support field-dependent settings in the builder, I think. -- 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