javanna commented on code in PR #16975:
URL: https://github.com/apache/lucene/pull/16975#discussion_r4467887069
##########
lucene/highlighter/src/java/org/apache/lucene/search/uhighlight/UnifiedHighlighter.java:
##########
@@ -530,39 +415,18 @@ protected Set<HighlightFlag> evaluateFlags(
}
/**
- * Evaluate the highlight flags and set the {@link #flags} variable. This is
called only once when
- * the Builder object is used to create a UH object.
+ * Evaluate the highlight flags. This is called only once when the Builder
object is used to
+ * create a UH object.
*
* @param uhBuilder - {@link Builder} object.
* @return {@link HighlightFlag}s.
*/
protected Set<HighlightFlag> evaluateFlags(Builder uhBuilder) {
- if (flags != null) {
- return flags;
- }
- return flags =
- evaluateFlags(
- uhBuilder.handleMultiTermQuery,
- uhBuilder.highlightPhrasesStrictly,
- uhBuilder.passageRelevancyOverSpeed,
- uhBuilder.weightMatches);
- }
-
- /**
- * Evaluate the highlight flags and set the {@link #flags} variable. This is
called every time
- * {@link #getFlags(String)} method is called. This is used in the builder
and has been marked
- * deprecated since it is used only for the mutable initialization of a UH
object.
- *
- * @param uh - {@link UnifiedHighlighter} object.
- * @return {@link HighlightFlag}s.
- */
- @Deprecated
- protected Set<HighlightFlag> evaluateFlags(UnifiedHighlighter uh) {
return evaluateFlags(
- uh.handleMultiTermQuery,
- uh.highlightPhrasesStrictly,
- uh.passageRelevancyOverSpeed,
- uh.weightMatches);
+ uhBuilder.handleMultiTermQuery,
+ uhBuilder.highlightPhrasesStrictly,
+ uhBuilder.passageRelevancyOverSpeed,
+ uhBuilder.weightMatches);
Review Comment:
that's fine by me!
--
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]