mayya-sharipova commented on code in PR #13268:
URL: https://github.com/apache/lucene/pull/13268#discussion_r1556357241
##########
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:
@jimczi Thanks, this is a great comment, addressed with recent commit. The
amount of changes is much smaller now.
I opted for naming of `matchedFields` similar to `FastVectorHighlighter`,
but willing to change it to `maskedFields` if it is a better option.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]