jimczi commented on code in PR #13268: URL: https://github.com/apache/lucene/pull/13268#discussion_r1556370339
########## lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/UnifiedHighlighter.java: ########## @@ -712,17 +712,21 @@ public String[] highlight(String field, Query query, TopDocs topDocs) throws IOE * @param topDocs TopDocs containing the summary result documents to highlight. * @param maxPassages The maximum number of top-N ranked passages used to form the highlighted * snippets. + * @param matchedFields fields whose matched are combined to highlight the given field * @return Array of formatted snippets corresponding to the documents in <code>topDocs</code>. If * no highlights were found for a document, the first {@code maxPassages} sentences from the * field will be returned. * @throws IOException if an I/O error occurred during processing * @throws IllegalArgumentException if <code>field</code> was indexed without {@link * IndexOptions#DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS} */ - public String[] highlight(String field, Query query, TopDocs topDocs, int maxPassages) + public String[] highlight( + String field, Query query, TopDocs topDocs, int maxPassages, Set<String> matchedFields) Review Comment: Thanks @mayya-sharipova . I have a slight preference for `maskedFields` since we already have a `fieldMatcher` which exposes a different feature. -- 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