mayya-sharipova commented on code in PR #13268:
URL: https://github.com/apache/lucene/pull/13268#discussion_r1559895242


##########
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:
   Great suggestion, addressed in 
https://github.com/apache/lucene/pull/13268/commits/4dec32a339e95106ee9bc7be668a110ef296bb75



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