jimczi commented on code in PR #13268: URL: https://github.com/apache/lucene/pull/13268#discussion_r1559420851
########## lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/UnifiedHighlighter.java: ########## @@ -360,6 +366,22 @@ public Builder withFieldMatcher(Predicate<String> value) { return this; } + /** + * Set up a function that given a field retuns a set of masked fields whose matches are combined + * to highlight the given field. This is useful when you want to highlight a field based on + * matches from several fields. + * + * <p>Note: All masked fields must share the same source as the field being highlighted, + * otherwise their offsets will not correspond to the highlighted field. + * + * <p>Note: Only the field being highlighted must provide an original source value (e.g. through + * stored field), other masked fields don't need it. + */ Review Comment: It's unclear whether the original field must be added in the list or not? Currently the highlighted fields must be present in the returned set to be considered for highlighting. Should we instead consider these masked fields as extra fields (in addition to the original highlighted fields)? -- 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